PIbd-22_Fedorenko_Puchkina_.../LawFim/LawFirmContracts/ViewModels/HearingViewModel.cs

26 lines
828 B
C#
Raw Normal View History

using LawFimDataModels.Models;
using System.ComponentModel;
2024-05-30 03:12:16 +04:00
using Newtonsoft.Json;
namespace LawFirmContracts.ViewModels
{
public class HearingViewModel : IHearingModel
{
[DisplayName("Номер слушания")]
public int Id { get; set; }
[DisplayName("Дата слушания")]
public DateTime HearingDate { get; set; }
[DisplayName("Суд")]
public string Judge { get; set; } = string.Empty;
public int GuarantorId { get; set; }
public Dictionary<int, ILawyerModel> HearingLawyers { get; set; } = new();
2024-05-30 03:12:16 +04:00
public HearingViewModel() { }
[JsonConstructor]
public HearingViewModel(Dictionary<int, LawyerViewModel> HearingLawyers)
{
this.HearingLawyers = HearingLawyers.ToDictionary(x => x.Key, x => x.Value as ILawyerModel);
}
}
}