ISEbd-22_Rozhkov.I.E._Simple/GasStation/Entities/Supply.cs

27 lines
686 B
C#
Raw Normal View History

2024-11-13 23:20:06 +04:00
namespace GasStation.Entities;
public class Supply
{
public int Id { get; private set; }
public int SupplierID { get; private set; }
public int ProductID { get; private set; }
public DateTime SupplyDate { get; private set; }
public IEnumerable<SupplySupply> SupplySupplies { get; private set; } = [];
public static Supply CreateSupply(int id, int supplierID, int productID, IEnumerable<SupplySupply> supplySupplies)
{
return new Supply
{
Id = id,
SupplierID = supplierID,
ProductID = productID,
SupplyDate = DateTime.Now,
SupplySupplies = supplySupplies
};
}
}