27 lines
684 B
C#
27 lines
684 B
C#
namespace GasStation.Entities;
|
|
|
|
public class Selling
|
|
{
|
|
public int Id { get; private set; }
|
|
|
|
public int GasmanId { get; private set; }
|
|
|
|
public int Count { get; private set; }
|
|
|
|
public IEnumerable<ProductSelling> ProdutcSellings { get; private set; } = [];
|
|
|
|
public DateTime SellingDateTime { get; private set; }
|
|
|
|
public static Selling CreateSelling(int id, int gasmanId, int count, IEnumerable<ProductSelling> produtcSellings)
|
|
{
|
|
return new Selling
|
|
{
|
|
Id = id,
|
|
GasmanId = gasmanId,
|
|
Count = count,
|
|
SellingDateTime = DateTime.Now,
|
|
ProdutcSellings = produtcSellings
|
|
};
|
|
}
|
|
}
|