PIBD14-Boyko-M.S.-GSM-Autot.../ProjectGSM/Entities/Case.cs

47 lines
1.4 KiB
C#
Raw Normal View History

2024-11-05 03:59:13 +04:00
namespace ProjectGSM.Entities;
public class Case
{
public int Id { get; private set; }
public int TypeAppealId { get; private set; }
public bool Payment { get; private set; } = false;
public decimal Price { get; private set; }
public decimal VictoryPrice { get; private set; }
public int StatusId { get; private set; }
public bool Verdict { get; private set; } = false;
public int CourtId { get; private set; }
public int ClientId { get; private set; }
public string Description { get; private set; } = string.Empty;
public DateTime CreatedAt { get; private set; } = DateTime.UtcNow;
// Конструктор для создания сущности
public static Case CreateEntity(
int id,
int typeAppealId,
bool payment,
decimal price,
decimal victoryPrice,
int statusId,
bool verdict,
int courtId,
int clientId,
string description
)
{
return new Case
{
Id = id,
TypeAppealId = typeAppealId,
Payment = payment,
Price = price,
VictoryPrice = victoryPrice,
StatusId = statusId,
Verdict = verdict,
CourtId = courtId,
ClientId = clientId,
Description = description ?? string.Empty,
CreatedAt = DateTime.UtcNow
};
}
}