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

34 lines
834 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; set; }
public static Driver CreateDriver(int id, string fname, string lname ,string phone_num, int truck_id)
{
return new Driver
{
Id = id,
First_name = fname,
Last_name = lname,
Phone_Number = phone_num ?? string.Empty,
TruckID = truck_id
};
}
}