2024-04-28 16:00:22 +04:00
|
|
|
|
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; }
|
2024-04-28 16:57:59 +04:00
|
|
|
|
public Dictionary<int, ISaleModel> EmployeeSale { get; set; } = new();
|
|
|
|
|
public Dictionary<int, IEmployeeInspectionModel> EmployeeInspection { get; set; }
|
2024-04-28 16:00:22 +04:00
|
|
|
|
|
|
|
|
|
public EmployeeViewModel() { }
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
2024-04-28 16:57:59 +04:00
|
|
|
|
public EmployeeViewModel(Dictionary<int, SaleViewModel> EmployeeSale)
|
2024-04-28 16:00:22 +04:00
|
|
|
|
{
|
2024-04-28 16:57:59 +04:00
|
|
|
|
this.EmployeeSale = EmployeeSale.ToDictionary(x => x.Key, x => x.Value as ISaleModel);
|
2024-04-28 16:00:22 +04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|