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

21 lines
641 B
C#
Raw Normal View History

2024-11-05 03:59:13 +04:00
namespace ProjectGSM.Entities;
public class CaseAdvocate
{
public int CaseId { get; private set; }
public int AdvocateId { get; private set; }
2024-11-09 03:06:08 +04:00
public string Post { get; private set; } = string.Empty;
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 CaseAdvocate CreateEntity(int caseId, int advocateId, string post)
2024-11-05 03:59:13 +04:00
{
return new CaseAdvocate
{
CaseId = caseId,
AdvocateId = advocateId,
2024-11-09 03:06:08 +04:00
Post = post,
2024-11-05 03:59:13 +04:00
CreatedAt = DateTime.UtcNow
};
}
}