PIbd-22_Fedorenko_Puchkina_.../LawFim/LawFirmContracts/ViewModels/ConsultationViewModel.cs
2024-05-30 03:12:19 +04:00

30 lines
1018 B
C#

using LawFimDataModels.Models;
using Newtonsoft.Json;
using System.ComponentModel;
namespace LawFirmContracts.ViewModels
{
public class ConsultationViewModel : IConsultationModel
{
[DisplayName("Номер консультации")]
public int Id { get; set; }
[DisplayName("Цена консультации")]
public double Cost { get; set; }
[DisplayName("Дата консультации")]
public DateTime ConsultationDate { get; set; }
[DisplayName("Дело")]
public string CaseName { get; set; } = string.Empty;
public int CaseId { get; set; }
public int GuarantorId { get; set; }
public Dictionary<int, ILawyerModel> ConsultationLawyers { get; set; } = new();
public ConsultationViewModel() { }
[JsonConstructor]
public ConsultationViewModel(Dictionary<int, ClientViewModel> ConsultationLawyers)
{
this.ConsultationLawyers = ConsultationLawyers.ToDictionary(x => x.Key, x => x.Value as ILawyerModel);
}
}
}