using LawFimDataModels.Models; using System.ComponentModel; using Newtonsoft.Json; namespace LawFirmContracts.ViewModels { public class VisitViewModel : IVisitModel { public int Id { get; set; } [DisplayName("Дата визита")] public DateTime VisitDate { get; set; } public int HearingId { get; set; } public Dictionary VisitClients { get; set; } = new(); public int ExecutorId { get; set; } public VisitViewModel() { } [JsonConstructor] public VisitViewModel(Dictionary VisitClients) { this.VisitClients = VisitClients.ToDictionary(x => x.Key, x => x.Value as IClientModel); } } }