22 lines
660 B
C#
22 lines
660 B
C#
namespace ProjectGSM.Entities;
|
|
|
|
public class Status
|
|
{
|
|
public int Id { get; private set; }
|
|
public string Name { get; private set; } = string.Empty;
|
|
public DateTime CreatedAt { get; private set; } = DateTime.UtcNow;
|
|
public decimal? Price { get; private set; }
|
|
|
|
// Конструктор для создания сущности
|
|
public static Status CreateEntity(int id, string name, decimal? price = null, DateTime? dateTime = null)
|
|
{
|
|
return new Status
|
|
{
|
|
Id = id,
|
|
Name = name ?? string.Empty,
|
|
Price = price,
|
|
CreatedAt = dateTime ?? DateTime.UtcNow
|
|
};
|
|
}
|
|
}
|