using CarCenterDataModels.Models; using System.ComponentModel; using Newtonsoft.Json; namespace CarCenterContracts.ViewModels { public class EmployeeViewModel : IEmployeeModel { [DisplayName("ФИО Сотрудника")] public string EmployeeFIO { get; set; } = string.Empty; [DisplayName("Специализация")] public string Specialization { get; set; } = string.Empty; public int ManagerId { get; set; } public int Id { get; set; } public Dictionary EmployeeSales { get; set; } = new(); public Dictionary EmployeeInspection { get; set; } public EmployeeViewModel() { } [JsonConstructor] public EmployeeViewModel(Dictionary EmployeeSales) { this.EmployeeSales = EmployeeSales.ToDictionary(x => x.Key, x => x.Value as ISaleModel); } } }