2024-04-18 21:44:46 +04:00
|
|
|
|
using LawFimDataModels.Enums;
|
|
|
|
|
using LawFimDataModels.Models;
|
|
|
|
|
using System.ComponentModel;
|
2024-05-30 02:13:55 +04:00
|
|
|
|
using Newtonsoft.Json;
|
2024-04-18 21:44:46 +04:00
|
|
|
|
|
|
|
|
|
namespace LawFirmContracts.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class CaseViewModel : ICaseModel
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
[DisplayName("Название")]
|
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
|
[DisplayName("Статус")]
|
|
|
|
|
public CaseStatus Status { get; set; } = CaseStatus.Неизвестен;
|
|
|
|
|
[DisplayName("Вид производства")]
|
|
|
|
|
public string CaseType { get; set; } = string.Empty;
|
|
|
|
|
[DisplayName("Дата создания")]
|
|
|
|
|
public DateTime DateCreate { get; set; }
|
|
|
|
|
[DisplayName("Дата выполнения")]
|
|
|
|
|
public DateTime? DateImplement { get; set; }
|
|
|
|
|
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
2024-04-27 23:00:03 +04:00
|
|
|
|
public int ExecutorId { get; set; }
|
2024-05-30 02:13:55 +04:00
|
|
|
|
public CaseViewModel() { }
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
public CaseViewModel(Dictionary<int, ClientViewModel> CaseClients)
|
|
|
|
|
{
|
|
|
|
|
this.CaseClients = CaseClients.ToDictionary(x => x.Key, x => x.Value as IClientModel);
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-04-18 21:44:46 +04:00
|
|
|
|
}
|