PIbd-21_BatylkinaAO_MusoevD.../Canteen/CanteenDatabaseImplement/Models/Tableware.cs
2023-04-07 17:58:07 +03:00

27 lines
803 B
C#

using CanteenDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CanteenDatabaseImplement.Models
{
public class Tableware : ITablewareModel
{
public int Id { get; private set; }
[Required]
public int VisitorId { get; private set; }
[Required]
public int OrderId { get; private set; }
[Required]
public string TablewareName { get; private set; } = string.Empty;
[Required]
public int Count { get; private set; }
[ForeignKey("TablewareId")]
public virtual List<OrderTableware> Orders { get; set; } = new();
}
}