28 lines
901 B
C#
28 lines
901 B
C#
using ProjectFuel.Entities.Enums;
|
|
using ProjectFuel.Entities.Enums;
|
|
|
|
namespace ProjectFuel.Entities;
|
|
|
|
public class Car
|
|
{
|
|
public int Car_ID { get; private set; }
|
|
public string Car_Mark { get; private set; } = string.Empty;
|
|
public string Car_Model { get; private set; } = string.Empty;
|
|
public Car_Type Car_Type { get; private set; }
|
|
public Driver_License License { get; private set; }
|
|
public float Consumption_Rate { get; private set; }
|
|
|
|
public static Car CreateEntity(int car_ID, string car_mark, string car_model, Car_Type car_type, Driver_License license, float consumption)
|
|
{
|
|
return new Car
|
|
{
|
|
Car_ID = car_ID,
|
|
Car_Mark = car_mark ?? string.Empty,
|
|
Car_Model = car_model ?? string.Empty,
|
|
Car_Type = car_type,
|
|
License = license,
|
|
Consumption_Rate = consumption
|
|
};
|
|
}
|
|
}
|