30 lines
926 B
C#
Raw Normal View History

2024-12-11 09:33:12 +04:00
using ProjectAirline.Entities.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2024-11-27 00:03:35 +04:00
2024-12-11 09:33:12 +04:00
namespace ProjectAirline.Entities;
public class Employee
2024-11-27 00:03:35 +04:00
{
2024-12-11 09:33:12 +04:00
public int Id { get; private set; }
public string FirstName { get; private set; } = string.Empty;
public string LastName { get; private set; } = string.Empty;
public string ContactInformation { get; private set; } = string.Empty;
public EmployeePost EmployeePost { get; private set; }
public static Employee CreateEntity(int id, string first, string last, string contactInfo,
EmployeePost employeePost)
2024-11-27 00:03:35 +04:00
{
2024-12-11 09:33:12 +04:00
return new Employee
2024-11-27 00:03:35 +04:00
{
2024-12-11 09:33:12 +04:00
Id = id,
FirstName = first ?? string.Empty,
LastName = last ?? string.Empty,
ContactInformation = contactInfo ?? string.Empty,
EmployeePost = employeePost
};
2024-11-27 00:03:35 +04:00
}
2024-12-11 09:33:12 +04:00
}