31 lines
983 B
C#
31 lines
983 B
C#
using FuelAndLubricants.Entities.Enums;
|
|
|
|
namespace FuelAndLubricants.Entities;
|
|
|
|
public class Trip
|
|
{
|
|
public int Trip_ID { get; private set; }
|
|
public DateTime Start_Date { get; private set; }
|
|
public DateTime End_Date { get; private set; }
|
|
public Shift Shift { get; private set; }
|
|
public float Fuel_Consumption { get; private set; }
|
|
public int Car_ID { get; private set; }
|
|
public int Driver_ID { get; private set; }
|
|
public int Route_ID { get; private set; }
|
|
|
|
public static Trip CreateOperation(int trip_id, DateTime start_date, DateTime end_date, Shift shift, float consumption, int car_id, int driver_id, int route_id)
|
|
{
|
|
return new Trip
|
|
{
|
|
Trip_ID = trip_id,
|
|
Start_Date = start_date,
|
|
End_Date = end_date,
|
|
Shift = shift,
|
|
Fuel_Consumption = consumption,
|
|
Car_ID = car_id,
|
|
Driver_ID = driver_id,
|
|
Route_ID = route_id
|
|
};
|
|
}
|
|
}
|