28 lines
950 B
C#
Raw Normal View History

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