PIbd-23_Baryshev_D.A._Garage/ProjectGarage/Entities/Driver.cs

34 lines
838 B
C#

using ProjectGarage.Entities.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectGarage.Entities;
public class Driver
{
public int Id { get;private set; }
public string First_name { get;private set; } = string.Empty;
public string Last_name { get;private set; } = string.Empty;
public string Phone_Number { get;private set; } = string.Empty;
public int TruckId { get;private set; }
public static Driver CreateDriver(int id, string fname, string lname ,string phone_num, int tryckid)
{
return new Driver
{
Id = id,
First_name = fname,
Last_name = lname,
Phone_Number = phone_num ?? string.Empty,
TruckId = tryckid
};
}
}