2024-11-09 03:06:08 +04:00
|
|
|
|
using ProjectGSM.Entities.Enums;
|
|
|
|
|
|
|
|
|
|
namespace ProjectGSM.Entities;
|
2024-11-05 03:59:13 +04:00
|
|
|
|
|
|
|
|
|
public class StatusHistory
|
|
|
|
|
{
|
|
|
|
|
public int CaseId { get; private set; }
|
2024-11-09 03:06:08 +04:00
|
|
|
|
public Status Status { get; private set; }
|
|
|
|
|
public decimal Price { get; private set; }
|
2024-11-05 03:59:13 +04:00
|
|
|
|
public DateTime CreatedAt { get; private set; } = DateTime.UtcNow;
|
|
|
|
|
|
|
|
|
|
// Конструктор для создания сущности
|
2024-11-09 03:06:08 +04:00
|
|
|
|
public static StatusHistory CreateEntity(int caseId, Status status, decimal price, DateTime? dateTime = null)
|
2024-11-05 03:59:13 +04:00
|
|
|
|
{
|
|
|
|
|
return new StatusHistory
|
|
|
|
|
{
|
|
|
|
|
CaseId = caseId,
|
2024-11-09 03:06:08 +04:00
|
|
|
|
Status = status,
|
|
|
|
|
Price = price,
|
2024-11-05 03:59:13 +04:00
|
|
|
|
CreatedAt = dateTime ?? DateTime.UtcNow
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|