27 lines
686 B
C#
27 lines
686 B
C#
|
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
|
|||
|
};
|
|||
|
}
|
|||
|
}
|