2024-11-05 23:39:22 +04:00
|
|
|
|
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;
|
|
|
|
|
|
2024-11-20 00:53:28 +04:00
|
|
|
|
public TruckType Type { get; set; }
|
2024-11-05 23:39:22 +04:00
|
|
|
|
|
|
|
|
|
public int MaxFuel { get; private set; }
|
|
|
|
|
|
2024-11-20 00:53:28 +04:00
|
|
|
|
public static Truck CreateTruck(int id,string numbers, TruckType type, int maxFuel)
|
2024-11-05 23:39:22 +04:00
|
|
|
|
{
|
|
|
|
|
return new Truck()
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
|
|
|
|
Numbers = numbers,
|
2024-11-20 00:53:28 +04:00
|
|
|
|
Type = type,
|
|
|
|
|
MaxFuel = maxFuel
|
2024-11-05 23:39:22 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|