2024-03-09 21:44:01 +04:00
|
|
|
|
using HotelDataModels.Models;
|
2024-03-23 18:43:34 +04:00
|
|
|
|
using Newtonsoft.Json;
|
2024-03-09 21:44:01 +04:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
|
|
|
namespace HotelContracts.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class RoomViewModel : IRoomModel
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
|
|
[DisplayName("Название комнаты")]
|
|
|
|
|
public string RoomName { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[DisplayName("Корпус комнаты")]
|
|
|
|
|
public string RoomFrame { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[DisplayName("Стоимость комнаты")]
|
|
|
|
|
public double RoomPrice { get; set; }
|
|
|
|
|
|
|
|
|
|
public int MealPlanId { get; set; }
|
|
|
|
|
|
|
|
|
|
public int HeadwaiterId { get; set; }
|
2024-03-10 00:15:58 +04:00
|
|
|
|
|
|
|
|
|
public Dictionary<int, ILunchModel> RoomLunches { get; set; }
|
2024-03-23 18:43:34 +04:00
|
|
|
|
|
|
|
|
|
public RoomViewModel() { }
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
public RoomViewModel(Dictionary<int, LunchViewModel> RoomDinners)
|
|
|
|
|
{
|
|
|
|
|
this.RoomLunches = RoomDinners.ToDictionary(x => x.Key, x => x.Value as ILunchModel);
|
|
|
|
|
}
|
2024-03-09 21:44:01 +04:00
|
|
|
|
}
|
|
|
|
|
}
|