начало

This commit is contained in:
cyxaruk 2024-11-10 12:07:31 +04:00
parent 8770c7a743
commit 13e90c4e85
3 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectPeopleTransportation.Entities;
internal class Bus
{
public int ID { get; private set; }
public string Model { get; private set; } = string.Empty;
public string Brand { get; private set; } = string.Empty;
public int BusNum { get; private set; }
public int YearOfCreation { get; private set; }
public static Bus CreateEntity(int id, string model, int busNum, string brand, int yearOfCreation)
{
return new Bus
{
ID = id,
Model = model,
BusNum = busNum,
Brand = brand,
YearOfCreation = yearOfCreation
};
}
}

View File

@ -0,0 +1,29 @@
using ProjectPeopleTransportation.Entities.Enums;
namespace ProjectPeopleTransportation.Entities;
public class Employee
{
public int Id { get; private set; }
public string FirstName { get; private set; } = string.Empty;
public string LastName { get; private set; } = string.Empty;
public int PhoneNum { get; private set; }
public EmployeePost EmployeePost { get; private set; }
public static Employee CreateEntity(int id, string first, string last, int phone, EmployeePost employeePost)
{
return new Employee
{
Id = id,
FirstName = first ?? string.Empty,
LastName = last ?? string.Empty,
PhoneNum = phone,
EmployeePost = employeePost
};
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectPeopleTransportation.Entities.Enums;
public enum EmployeePost
{
None = 0,
Admin = 1,
Engineer = 2,
Driver = 3,
Conductor = 4
}