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

27 lines
684 B
C#
Raw Normal View History

2024-11-13 23:20:06 +04:00
namespace GasStation.Entities;
public class Selling
{
public int Id { get; private set; }
public int GasmanId { get; private set; }
public int Count { get; private set; }
2024-12-02 14:38:24 +04:00
public IEnumerable<ProductSelling> ProdutcSellings { get; private set; } = [];
2024-11-13 23:20:06 +04:00
public DateTime SellingDateTime { get; private set; }
2024-12-02 14:38:24 +04:00
public static Selling CreateSelling(int id, int gasmanId, int count, IEnumerable<ProductSelling> produtcSellings)
2024-11-13 23:20:06 +04:00
{
return new Selling
{
Id = id,
GasmanId = gasmanId,
Count = count,
2024-12-02 14:38:24 +04:00
SellingDateTime = DateTime.Now,
ProdutcSellings = produtcSellings
2024-11-13 23:20:06 +04:00
};
}
}