PIbd-42_Kashin_M.I_CPO_Cour.../EmployeeManagmentDataBaseImplement/Models/Employee.cs

30 lines
840 B
C#

using EmployeeManagmentDataModels.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EmployeeManagmentDataBaseImplement.Models
{
public class Employee : IEmployee
{
[Key]
public int Id { get; set; }
[Required]
public string NameJob { get; set; } = string.Empty;
public DateTime? StartJob { get; set; }
public DateTime? EndJob { get; set; }
public string? PartTimeJob { get; set; }
public float Bid { get; set; }
[ForeignKey("PhisicalPerson")]
public int? PhisicalPersonsId { get; set; }
public PhisicalPerson? PhisicalPerson { get; set; }
public List<Salary> Salaries { get; set; } = new();
public List<Vacation> Vacations { get; set; } = new();
}
}