Add view models

This commit is contained in:
Viltskaa 2023-04-06 18:03:48 +04:00
parent 1cd297eec8
commit c4b5f00cb8
7 changed files with 71 additions and 2 deletions

View File

@ -7,10 +7,8 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="BusinessLogicsContracts" />
<Folder Include="SearchModels" />
<Folder Include="StoragesContracts" />
<Folder Include="ViewModels" />
</ItemGroup>
<ItemGroup>

View File

@ -0,0 +1,9 @@
using HotelDataModels.Models;
namespace HotelContracts.ViewModels;
public class CleaningInstrumentsViewModel : ICleaningInstrumentsModel
{
public int Id { get; set; }
public string Type { get; set; } = string.Empty;
}

View File

@ -0,0 +1,11 @@
using HotelDataModels.Models;
namespace HotelContracts.ViewModels;
public class CleaningViewModel : ICleaningModel
{
public int Id { get; set; }
public DateTime Date { get; set; }
public int RoomId { get; set; }
public Dictionary<int, ICleaningInstrumentsModel> CleaningInstruments { get; set; }
}

View File

@ -0,0 +1,11 @@
using HotelDataModels.Models;
namespace HotelContracts.ViewModels;
public class GuestViewModel : IGuestModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string SecondName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
}

View File

@ -0,0 +1,13 @@
using HotelDataModels.Models;
namespace HotelContracts.ViewModels;
public class MaitreViewModel : IMaitreModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string SecondName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public string Login { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}

View File

@ -0,0 +1,16 @@
using System.ComponentModel;
using HotelDataModels.Models;
namespace HotelContracts.ViewModels;
public class ReservationViewModel : IReservationModel
{
public int Id { get; set; }
[DisplayName("Start or reservation")]
public DateTime StartDate { get; set; }
[DisplayName("End or reservation")]
public DateTime EndDate { get; set; }
public int GuestId { get; set; }
public int MaitreId { get; set; }
public Dictionary<int, IRoomModel> ReservationsRooms { get; set; }
}

View File

@ -0,0 +1,11 @@
using System.ComponentModel;
using HotelDataModels.Models;
namespace HotelContracts.ViewModels;
public class RoomViewModel : IRoomModel
{
public int Id { get; set; }
public string Type { get; set; } = string.Empty;
public double Cost { get; set; }
}