24 lines
616 B
C#
24 lines
616 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace SushiBarDatabaseImplement.Models
|
|
{
|
|
public class Dish
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public string DishName { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Category { get; set; } = string.Empty;
|
|
|
|
[ForeignKey("DishId")]
|
|
public virtual List<DishIngredient> DishIngredients { get; set; } = new();
|
|
|
|
[ForeignKey("DishId")]
|
|
public virtual List<ChequeItem> ChequeItems { get; set; } = new();
|
|
}
|
|
}
|