2023-04-01 19:20:54 +04:00
|
|
|
|
using HotelDataModels.Models;
|
|
|
|
|
using System.ComponentModel;
|
2023-05-16 17:41:58 +04:00
|
|
|
|
using Newtonsoft.Json;
|
2023-04-01 19:20:54 +04:00
|
|
|
|
|
|
|
|
|
namespace HotelContracts.ViewModels
|
2023-04-01 18:42:08 +04:00
|
|
|
|
{
|
2023-04-01 19:20:54 +04:00
|
|
|
|
public class ConferenceViewModel : IConferenceModel
|
2023-04-01 18:42:08 +04:00
|
|
|
|
{
|
2023-04-01 19:20:54 +04:00
|
|
|
|
[DisplayName("Название конференции")]
|
|
|
|
|
public string ConferenceName { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[DisplayName("Дата начала конференции")]
|
|
|
|
|
public DateTime StartDate { get; set; }
|
|
|
|
|
|
|
|
|
|
public int OrganiserId { get; set; }
|
|
|
|
|
|
|
|
|
|
public int Id { get; set; }
|
2023-05-16 17:41:58 +04:00
|
|
|
|
public Dictionary<int, IMemberModel> ConferenceMembers { get; set; } = new();
|
2023-04-07 13:49:59 +04:00
|
|
|
|
public Dictionary<int, IConferenceBookingModel> ConferenceConferenceBooking { get; set; }
|
2023-05-16 17:41:58 +04:00
|
|
|
|
|
|
|
|
|
public ConferenceViewModel() { }
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
public ConferenceViewModel(Dictionary<int, MemberViewModel> ConferenceMembers)
|
|
|
|
|
{
|
|
|
|
|
this.ConferenceMembers = ConferenceMembers.ToDictionary(x => x.Key, x => x.Value as IMemberModel);
|
|
|
|
|
}
|
2023-04-01 18:42:08 +04:00
|
|
|
|
}
|
|
|
|
|
}
|