2024-08-28 03:10:45 +04:00

28 lines
950 B
C#

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