package com.example.myapplication.database.room.model.bike

import com.example.myapplication.database.room.model.item.ItemFromBike

data class BikeWithItems(
    val bike: Bike,
    val items: List<ItemFromBike>
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as BikeWithItems

        if (bike != other.bike) return false
        if (items != other.items) return false

        return true
    }

    override fun hashCode(): Int {
        var result = bike.hashCode()
        result = 31 * result + items.hashCode()
        return result
    }
}