using CanteenDataModels.Enums; using CanteenDataModels.Models; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CanteenDatabaseImplement.Models { public class Order : IOrderModel { public int Id { get; private set; } [Required] public int VisitorId { get; private set; } [Required] public string Description { get; private set; } = string.Empty; [Required] public double Sum { get; private set; } [Required] public DateTime DateCreate { get; private set; } = DateTime.Now; [ForeignKey("OrderId")] public virtual List OrderLunches { get; set; } = new(); [ForeignKey("OrderId")] public virtual List OrderCooks { get; set; } = new(); [ForeignKey("OrderId")] public virtual List OrderDishes { get; set; } = new(); [ForeignKey("OrderId")] public virtual List Orderablewares { get; set; } = new(); } }