PIbd-21_BatylkinaAO_MusoevD.../Canteen/CanteenDatabaseImplement/Models/Cook.cs

30 lines
990 B
C#
Raw Normal View History

2023-04-07 10:55:40 +04:00
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 Cook : ICookModel
{
2023-04-07 18:58:07 +04:00
public int Id { get; private set; }
[Required]
public int ManagerId { get; private set; }
2023-04-07 10:55:40 +04:00
[Required]
public string Name { get; private set; } = string.Empty;
[Required]
public string Surname { get; private set; } = string.Empty;
public string? Patronymic { get; private set; } = string.Empty;
[Required]
public string Position { get; private set; } = string.Empty;
[ForeignKey("CookId")]
public virtual List<ProductCook> Products{ get; set; } = new();
[ForeignKey("CookId")]
2023-04-07 18:58:07 +04:00
public virtual List<OrderCook> Orders { get; set; } = new();
2023-04-07 10:55:40 +04:00
}
}