36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using ProjectOptika.Scripts.Entities.Enums;
|
|
using System.ComponentModel;
|
|
|
|
namespace ProjectOptika.Scripts.Entities
|
|
{
|
|
public class Employee
|
|
{
|
|
public int ID { get; private set; }
|
|
|
|
[DisplayName("Тип сотрудника")]
|
|
public PositionEmployee PositionEmployee { get; private set; }
|
|
|
|
[DisplayName("Имя")]
|
|
public string FirstName { get; private set; }
|
|
|
|
[DisplayName("Отчество")]
|
|
public string SecondName { get; private set; }
|
|
|
|
[DisplayName("Фамилия")]
|
|
public string Surname { get; private set; }
|
|
|
|
public string FullName => $"{FirstName} {SecondName} {Surname}";
|
|
|
|
public static Employee CreateEntity(int id, PositionEmployee positionEmployee, string firstName, string secondName, string surname) {
|
|
return new Employee
|
|
{
|
|
ID = id,
|
|
PositionEmployee = positionEmployee,
|
|
FirstName = firstName,
|
|
SecondName = secondName,
|
|
Surname = surname
|
|
};
|
|
}
|
|
}
|
|
}
|