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-12-09 14:34:46 +04:00
|
|
|
|
public int ProductCost { get; private set; }
|
2024-11-13 23:20:06 +04:00
|
|
|
|
|
2024-11-15 18:27:06 +04:00
|
|
|
|
public ProductType ProductType { get; private set; }
|
|
|
|
|
|
2024-12-09 14:34:46 +04:00
|
|
|
|
public static Product CreateProduct(int id, int productCost, ProductType productType)
|
2024-11-13 23:20:06 +04:00
|
|
|
|
{
|
|
|
|
|
return new Product
|
|
|
|
|
{
|
|
|
|
|
Id = id,
|
2024-12-09 14:34:46 +04:00
|
|
|
|
ProductCost = productCost,
|
2024-11-15 18:27:06 +04:00
|
|
|
|
ProductType = productType
|
2024-11-13 23:20:06 +04:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|