24 lines
711 B
C#
24 lines
711 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace CandyHouseDataBase.Models;
|
|
|
|
public class Pekar
|
|
{
|
|
[Key] public string Id { get; set; } = Guid.NewGuid().ToString();
|
|
|
|
[Required] public string FIO { get; set; }
|
|
|
|
[Required] public string PositionId { get; set; }
|
|
|
|
[Required] public decimal BonusCoefficient { get; set; }
|
|
|
|
public bool IsDeleted { get; set; } = false;
|
|
|
|
public Position Position { get; set; }
|
|
|
|
[ForeignKey("PekarId")] public List<Salary> Salaries { get; set; }
|
|
|
|
[ForeignKey("PekarId")] public List<PekarHistory> PekarHistories { get; set; }
|
|
[ForeignKey("PekarId")] public List<Order> Orders { get; set; }
|
|
} |