package com.example.shawarma.data.models

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "products")
data class ProductModel(
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    val id: Int?,
    @ColumnInfo(name = "product_title")
    val title: String,
    @ColumnInfo(name = "product_price")
    val price: Int,
    @ColumnInfo(name = "product_old_price")
    val oldPrice: Int?,
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false
        other as ProductModel
        if (id != other.id) return false
        return true
    }

    override fun hashCode(): Int {
        return id ?: -1
    }
}

fun getProducts() :List<ProductModel> {
    return listOf(
    )

}
