2024-11-13 23:20:06 +04:00
|
|
|
|
using GasStation.Entities.Enums;
|
|
|
|
|
|
|
|
|
|
namespace GasStation.Entities;
|
|
|
|
|
|
|
|
|
|
public class Product
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
|
|
|
|
|
2024-11-15 18:27:06 +04:00
|
|
|
|
public int Cost { get; private set; }
|
2024-11-13 23:20:06 +04:00
|
|
|
|
|
2024-11-15 18:27:06 +04:00
|
|
|
|
public Gasmen Gasmen { get; private set; }
|
|
|
|
|
|
|
|
|
|
public ProductType ProductType { get; private set; }
|
|
|
|
|
|
|
|
|
|
public static Product CreateProduct(int id, int cost ,Gasmen gasmen, ProductType productType)
|
2024-11-13 23:20:06 +04:00
|
|
|
|
{
|
|
|
|
|
return new Product
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
2024-11-15 18:27:06 +04:00
|
|
|
|
Cost = cost,
|
|
|
|
|
Gasmen = gasmen,
|
|
|
|
|
ProductType = productType
|
2024-11-13 23:20:06 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|