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

27 lines
772 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectGarage.Entities;
public class FuelReplenishment
{
public int Id { get; private set; }
public int DriverId { get; private set; }
public DateTime Date { get; private set; }
public IEnumerable<FuelFuelReplenishment> FuelFuelReplenishments { get; private set;} = [];
public static FuelReplenishment CreateOpeartion(int id, int driverId, IEnumerable<FuelFuelReplenishment> fuelFuelReplenishments)
{
return new FuelReplenishment
{
Id = id,
DriverId = driverId,
Date = DateTime.Now,
FuelFuelReplenishments = fuelFuelReplenishments
};
}
}