From 9ad3c6c13915e61531afc82a133ef039f7b58715 Mon Sep 17 00:00:00 2001 From: Viltskaa Date: Thu, 6 Apr 2023 17:44:51 +0400 Subject: [PATCH] Add binding models --- .../BindingModels/CleaningBindingModel.cs | 10 ++++++++++ .../CleaningInstrumentsBindingModel.cs | 9 +++++++++ .../BindingModels/GuestBindingModel.cs | 11 +++++++++++ .../BindingModels/MaitreBindingModel.cs | 13 +++++++++++++ .../BindingModels/ReservationBindingModel.cs | 12 ++++++++++++ .../BindingModels/RoomBindingModel.cs | 10 ++++++++++ Hotel/HotelContracts/HotelContracts.csproj | 11 +++++++++++ 7 files changed, 76 insertions(+) create mode 100644 Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs create mode 100644 Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs create mode 100644 Hotel/HotelContracts/BindingModels/GuestBindingModel.cs create mode 100644 Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs create mode 100644 Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs create mode 100644 Hotel/HotelContracts/BindingModels/RoomBindingModel.cs diff --git a/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs b/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs new file mode 100644 index 0000000..7e0c3c4 --- /dev/null +++ b/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs @@ -0,0 +1,10 @@ +using HotelDataModels.Models; + +namespace HotelContracts.BindingModels; + +public class CleaningBindingModel : ICleaning +{ + public int Id { get; } + public DateTime Date { get; } + public int RoomId { get; } +} \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs b/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs new file mode 100644 index 0000000..ffbc96a --- /dev/null +++ b/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs @@ -0,0 +1,9 @@ +using HotelDataModels.Models; + +namespace HotelContracts.BindingModels; + +public class CleaningInstrumentsBindingModel : ICleaningInstruments +{ + public int Id { get; } + public string Type { get; } +} \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs b/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs new file mode 100644 index 0000000..fe7d9c3 --- /dev/null +++ b/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs @@ -0,0 +1,11 @@ +using HotelDataModels.Models; + +namespace HotelContracts.BindingModels; + +public class GuestBindingModel : IGuest +{ + public int Id { get; } + public string Name { get; } + public string SecondName { get; } + public string LastName { get; } +} \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs b/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs new file mode 100644 index 0000000..5ab4a0d --- /dev/null +++ b/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs @@ -0,0 +1,13 @@ +using HotelDataModels.Models; + +namespace HotelContracts.BindingModels; + +public class MaitreBindingModel : IMaitre +{ + public int Id { get; } + public string Name { get; } + public string SecondName { get; } + public string LastName { get; } + public string Login { get; } + public string Password { get; } +} \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs b/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs new file mode 100644 index 0000000..19e47a6 --- /dev/null +++ b/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs @@ -0,0 +1,12 @@ +using HotelDataModels.Models; + +namespace HotelContracts.BindingModels; + +public class ReservationBindingModel : IReservation +{ + public int Id { get; } + public DateTime StartDate { get; } + public DateTime EndDate { get; } + public int GuestId { get; } + public int MaitreId { get; } +} \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs b/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs new file mode 100644 index 0000000..1416619 --- /dev/null +++ b/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs @@ -0,0 +1,10 @@ +using HotelDataModels.Models; + +namespace HotelContracts.BindingModels; + +public class RoomBindingModel : IRoom +{ + public int Id { get; } + public string Type { get; } + public int Cost { get; } +} \ No newline at end of file diff --git a/Hotel/HotelContracts/HotelContracts.csproj b/Hotel/HotelContracts/HotelContracts.csproj index 132c02c..4bb5c38 100644 --- a/Hotel/HotelContracts/HotelContracts.csproj +++ b/Hotel/HotelContracts/HotelContracts.csproj @@ -6,4 +6,15 @@ enable + + + + + + + + + + +