24 lines
698 B
C#
24 lines
698 B
C#
using ProjectGSM.Entities.Enums;
|
|
|
|
namespace ProjectGSM.Entities;
|
|
|
|
public class StatusHistory
|
|
{
|
|
public int CaseId { get; private set; }
|
|
public Status Status { get; private set; }
|
|
public decimal Price { get; private set; }
|
|
public DateTime CreatedAt { get; private set; } = DateTime.UtcNow;
|
|
|
|
// Конструктор для создания сущности
|
|
public static StatusHistory CreateEntity(int caseId, Status status, decimal price, DateTime? dateTime = null)
|
|
{
|
|
return new StatusHistory
|
|
{
|
|
CaseId = caseId,
|
|
Status = status,
|
|
Price = price,
|
|
CreatedAt = dateTime ?? DateTime.UtcNow
|
|
};
|
|
}
|
|
}
|