package com.example.shawarma.data.models

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.PrimaryKey
import java.util.Date

@Entity(
    tableName = "orders",
    foreignKeys = [
        ForeignKey(
            entity = UserModel::class,
            parentColumns = ["id"],
            childColumns = ["user_id"],
        )
    ]
)
data class OrderModel(
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    val id: Int?,
    @ColumnInfo(name = "order_status")
    var status: String,
    @ColumnInfo(name = "user_id", index = true)
    val userId: Int?,
    @ColumnInfo(name = "date")
    val date: Date
)

fun getOrdersByUserId() : List<OrderModel> {
    return listOf(
    )
}

fun getAllOrders() : List<OrderModel> {
    return listOf(
    )
}
