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

31 lines
662 B
C#
Raw Normal View History

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; }
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)
{
return new Truck()
{
Id = id,
Numbers = numbers,
2024-11-20 00:53:28 +04:00
Type = type,
MaxFuel = maxFuel
};
}
}