26 lines
828 B
C#
26 lines
828 B
C#
using LawFimDataModels.Models;
|
|
using System.ComponentModel;
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
namespace LawFirmContracts.ViewModels
|
|
{
|
|
public class HearingViewModel : IHearingModel
|
|
{
|
|
[DisplayName("Номер слушания")]
|
|
public int Id { get; set; }
|
|
[DisplayName("Дата слушания")]
|
|
public DateTime HearingDate { get; set; }
|
|
[DisplayName("Суд")]
|
|
public string Judge { get; set; } = string.Empty;
|
|
public int GuarantorId { get; set; }
|
|
public Dictionary<int, ILawyerModel> HearingLawyers { get; set; } = new();
|
|
public HearingViewModel() { }
|
|
[JsonConstructor]
|
|
public HearingViewModel(Dictionary<int, LawyerViewModel> HearingLawyers)
|
|
{
|
|
this.HearingLawyers = HearingLawyers.ToDictionary(x => x.Key, x => x.Value as ILawyerModel);
|
|
}
|
|
}
|
|
}
|