PIbd-22_Fedorenko_Puchkina_.../LawFim/LawFirmContracts/ViewModels/VisitViewModel.cs

23 lines
710 B
C#
Raw Normal View History

2024-04-18 21:44:46 +04:00
using LawFimDataModels.Models;
using System.ComponentModel;
using Newtonsoft.Json;
2024-04-18 21:44:46 +04:00
namespace LawFirmContracts.ViewModels
{
public class VisitViewModel : IVisitModel
{
public int Id { get; set; }
[DisplayName("Дата визита")]
public DateTime VisitDate { get; set; }
public int HearingId { get; set; }
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
2024-04-27 23:00:03 +04:00
public int ExecutorId { get; set; }
public VisitViewModel() { }
[JsonConstructor]
public VisitViewModel(Dictionary<int, ClientViewModel> VisitClients)
{
this.VisitClients = VisitClients.ToDictionary(x => x.Key, x => x.Value as IClientModel);
}
}
2024-04-18 21:44:46 +04:00
}