using LawFimDataModels.Models; using System.ComponentModel; 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 HearingLawyers { get; set; } = new(); public HearingViewModel() { } [JsonConstructor] public HearingViewModel(Dictionary HearingLawyers) { this.HearingLawyers = HearingLawyers.ToDictionary(x => x.Key, x => x.Value as ILawyerModel); } } }