34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
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
|
|
{
|
|
[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 DateTime DateOfBirth { get; private set; }
|
|
[Required]
|
|
public string Position { get; private set; } = string.Empty;
|
|
[Required]
|
|
public int ManagerId { get; private set; }
|
|
|
|
public int Id { get; private set; }
|
|
[ForeignKey("CookId")]
|
|
public virtual List<ProductCook> Products{ get; set; } = new();
|
|
[ForeignKey("CookId")]
|
|
public virtual List<CookOrder> Orders { get; set; } = new();
|
|
}
|
|
}
|