24 lines
584 B
C#
24 lines
584 B
C#
|
using System.ComponentModel.DataAnnotations;
|
|||
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
|
|||
|
namespace SushiBarDatabaseImplement.Models
|
|||
|
{
|
|||
|
public class Ingredient
|
|||
|
{
|
|||
|
[Key]
|
|||
|
public int Id { get; set; }
|
|||
|
|
|||
|
[Required]
|
|||
|
public string IngredientName { get; set; } = string.Empty;
|
|||
|
|
|||
|
[Required]
|
|||
|
public string Unit { get; set; } = string.Empty;
|
|||
|
|
|||
|
[Required]
|
|||
|
public double Cost { get; set; }
|
|||
|
|
|||
|
[ForeignKey("IngredientId")]
|
|||
|
public virtual List<DishIngredient> DishIngredients { get; set; } = new();
|
|||
|
}
|
|||
|
}
|