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

37 lines
869 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 Truck
{
public int Id { get; private set; }
public string Numbers { get; private set; } = string.Empty;
public string Brand { get; private set; } = string.Empty;
public string Model { get; private set; } = string.Empty;
public int MaxFuel { get; private set; }
public bool HasDriver { get; private set; }
public static Truck CreateTruck(int id,string numbers, string brand, string model, int maxFuel)
{
return new Truck()
{
Id = id,
Numbers = numbers,
Brand = brand,
Model = model,
MaxFuel = maxFuel,
HasDriver = false
};
}
}