SushiBarBase/SushiBar/SushiBarDatabaseImplement/Models/SushiComponent.cs

24 lines
561 B
C#
Raw Normal View History

2024-03-13 10:24:19 +04:00
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
2024-03-13 10:24:19 +04:00
namespace SushiBarDatabaseImplement.Models
{
[DataContract]
public class SushiComponent
2024-03-13 10:24:19 +04:00
{
[DataMember]
public int Id { get; set; }
[DataMember]
[Required]
2024-03-13 10:24:19 +04:00
public int SushiId { get; set; }
[DataMember]
[Required]
2024-03-13 10:24:19 +04:00
public int ComponentId { get; set; }
[DataMember]
[Required]
2024-03-13 10:24:19 +04:00
public int Count { get; set; }
public virtual Component Component { get; set; } = new();
2024-03-13 10:24:19 +04:00
public virtual Sushi Sushi { get; set; } = new();
}
}