24 lines
561 B
C#
24 lines
561 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace SushiBarDatabaseImplement.Models
|
|
{
|
|
[DataContract]
|
|
public class SushiComponent
|
|
{
|
|
[DataMember]
|
|
public int Id { get; set; }
|
|
[DataMember]
|
|
[Required]
|
|
public int SushiId { get; set; }
|
|
[DataMember]
|
|
[Required]
|
|
public int ComponentId { get; set; }
|
|
[DataMember]
|
|
[Required]
|
|
public int Count { get; set; }
|
|
public virtual Component Component { get; set; } = new();
|
|
public virtual Sushi Sushi { get; set; } = new();
|
|
}
|
|
}
|