using HotelDataModels.Models; using Newtonsoft.Json; using System.ComponentModel; namespace HotelContracts.ViewModels { public class ConferenceBookingViewModel : IConferenceBookingModel { public int ConferenceId { get; set; } public int HeadwaiterId { get; set; } public int Id { get; set; } [DisplayName("Дата начала конференции")] public DateTime? BookingDate { get; set; } public string ConfName { get; set; } = string.Empty; public string NameHall { get; set; } = string.Empty; public Dictionary ConferenceBookingLunches { get; set; } public Dictionary ConferenceConferenceBookings { get; set; } = new(); public ConferenceBookingViewModel() { } [JsonConstructor] public ConferenceBookingViewModel(Dictionary ConferenceBookingLunches, Dictionary ConferenceConferenceBookings) { this.ConferenceBookingLunches = ConferenceBookingLunches.ToDictionary(x => x.Key, x => x.Value as ILunchModel); this.ConferenceConferenceBookings = ConferenceConferenceBookings.ToDictionary(x => x.Key, x => x.Value as IConferenceBookingModel); } } }