From 10fb0d89385331f1aa393d8828f3abb1e0ee369c Mon Sep 17 00:00:00 2001 From: Viltskaa Date: Thu, 6 Apr 2023 17:52:12 +0400 Subject: [PATCH] Edit data models and binding models --- .../HotelContracts/BindingModels/CleaningBindingModel.cs | 3 ++- .../BindingModels/CleaningInstrumentsBindingModel.cs | 2 +- Hotel/HotelContracts/BindingModels/GuestBindingModel.cs | 2 +- Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs | 2 +- .../BindingModels/ReservationBindingModel.cs | 3 ++- Hotel/HotelContracts/BindingModels/RoomBindingModel.cs | 2 +- Hotel/HotelDataModels/Models/ICleaning.cs | 7 ------- ...leaningInstruments.cs => ICleaningInstrumentsModel.cs} | 2 +- Hotel/HotelDataModels/Models/ICleaningModel.cs | 8 ++++++++ .../HotelDataModels/Models/{IGuest.cs => IGuestModel.cs} | 2 +- .../Models/{IMaitre.cs => IMaitreModel.cs} | 2 +- .../Models/{IReservation.cs => IReservationModel.cs} | 3 ++- Hotel/HotelDataModels/Models/{IRoom.cs => IRoomModel.cs} | 2 +- 13 files changed, 22 insertions(+), 18 deletions(-) delete mode 100644 Hotel/HotelDataModels/Models/ICleaning.cs rename Hotel/HotelDataModels/Models/{ICleaningInstruments.cs => ICleaningInstrumentsModel.cs} (56%) create mode 100644 Hotel/HotelDataModels/Models/ICleaningModel.cs rename Hotel/HotelDataModels/Models/{IGuest.cs => IGuestModel.cs} (77%) rename Hotel/HotelDataModels/Models/{IMaitre.cs => IMaitreModel.cs} (82%) rename Hotel/HotelDataModels/Models/{IReservation.cs => IReservationModel.cs} (60%) rename Hotel/HotelDataModels/Models/{IRoom.cs => IRoomModel.cs} (71%) diff --git a/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs b/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs index 7e0c3c4..6737fa0 100644 --- a/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs @@ -2,9 +2,10 @@ namespace HotelContracts.BindingModels; -public class CleaningBindingModel : ICleaning +public class CleaningBindingModel : ICleaningModel { public int Id { get; } public DateTime Date { get; } public int RoomId { get; } + public Dictionary CleaningInstruments { get; } } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs b/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs index ffbc96a..0d7c482 100644 --- a/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs @@ -2,7 +2,7 @@ namespace HotelContracts.BindingModels; -public class CleaningInstrumentsBindingModel : ICleaningInstruments +public class CleaningInstrumentsBindingModel : ICleaningInstrumentsModel { public int Id { get; } public string Type { get; } diff --git a/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs b/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs index fe7d9c3..4d17bcd 100644 --- a/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs @@ -2,7 +2,7 @@ namespace HotelContracts.BindingModels; -public class GuestBindingModel : IGuest +public class GuestBindingModel : IGuestModel { public int Id { get; } public string Name { get; } diff --git a/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs b/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs index 5ab4a0d..bd8cdc7 100644 --- a/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs @@ -2,7 +2,7 @@ namespace HotelContracts.BindingModels; -public class MaitreBindingModel : IMaitre +public class MaitreModelBindingModel : IMaitreModel { public int Id { get; } public string Name { get; } diff --git a/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs b/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs index 19e47a6..9132c10 100644 --- a/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs @@ -2,11 +2,12 @@ namespace HotelContracts.BindingModels; -public class ReservationBindingModel : IReservation +public class ReservationModelBindingModel : IReservationModel { public int Id { get; } public DateTime StartDate { get; } public DateTime EndDate { get; } public int GuestId { get; } public int MaitreId { get; } + public Dictionary ReservationsRooms { get; } } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs b/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs index 1416619..735b475 100644 --- a/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs @@ -2,7 +2,7 @@ namespace HotelContracts.BindingModels; -public class RoomBindingModel : IRoom +public class RoomModelBindingModel : IRoomModel { public int Id { get; } public string Type { get; } diff --git a/Hotel/HotelDataModels/Models/ICleaning.cs b/Hotel/HotelDataModels/Models/ICleaning.cs deleted file mode 100644 index 1a0a170..0000000 --- a/Hotel/HotelDataModels/Models/ICleaning.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace HotelDataModels.Models; - -public interface ICleaning : IId -{ - DateTime Date { get; } - int RoomId { get; } -} \ No newline at end of file diff --git a/Hotel/HotelDataModels/Models/ICleaningInstruments.cs b/Hotel/HotelDataModels/Models/ICleaningInstrumentsModel.cs similarity index 56% rename from Hotel/HotelDataModels/Models/ICleaningInstruments.cs rename to Hotel/HotelDataModels/Models/ICleaningInstrumentsModel.cs index 47ed313..30bf291 100644 --- a/Hotel/HotelDataModels/Models/ICleaningInstruments.cs +++ b/Hotel/HotelDataModels/Models/ICleaningInstrumentsModel.cs @@ -1,6 +1,6 @@ namespace HotelDataModels.Models; -public interface ICleaningInstruments : IId +public interface ICleaningInstrumentsModel : IId { string Type { get; } } \ No newline at end of file diff --git a/Hotel/HotelDataModels/Models/ICleaningModel.cs b/Hotel/HotelDataModels/Models/ICleaningModel.cs new file mode 100644 index 0000000..fe0557a --- /dev/null +++ b/Hotel/HotelDataModels/Models/ICleaningModel.cs @@ -0,0 +1,8 @@ +namespace HotelDataModels.Models; + +public interface ICleaningModel : IId +{ + DateTime Date { get; } + int RoomId { get; } + Dictionary CleaningInstruments { get; } +} \ No newline at end of file diff --git a/Hotel/HotelDataModels/Models/IGuest.cs b/Hotel/HotelDataModels/Models/IGuestModel.cs similarity index 77% rename from Hotel/HotelDataModels/Models/IGuest.cs rename to Hotel/HotelDataModels/Models/IGuestModel.cs index 55ecf63..fa04a5a 100644 --- a/Hotel/HotelDataModels/Models/IGuest.cs +++ b/Hotel/HotelDataModels/Models/IGuestModel.cs @@ -1,6 +1,6 @@ namespace HotelDataModels.Models; -public interface IGuest : IId +public interface IGuestModel : IId { string Name { get; } string SecondName { get; } diff --git a/Hotel/HotelDataModels/Models/IMaitre.cs b/Hotel/HotelDataModels/Models/IMaitreModel.cs similarity index 82% rename from Hotel/HotelDataModels/Models/IMaitre.cs rename to Hotel/HotelDataModels/Models/IMaitreModel.cs index 84be2f8..d480f18 100644 --- a/Hotel/HotelDataModels/Models/IMaitre.cs +++ b/Hotel/HotelDataModels/Models/IMaitreModel.cs @@ -1,6 +1,6 @@ namespace HotelDataModels.Models; -public interface IMaitre : IId +public interface IMaitreModel : IId { string Name { get; } string SecondName { get; } diff --git a/Hotel/HotelDataModels/Models/IReservation.cs b/Hotel/HotelDataModels/Models/IReservationModel.cs similarity index 60% rename from Hotel/HotelDataModels/Models/IReservation.cs rename to Hotel/HotelDataModels/Models/IReservationModel.cs index c2ddd42..c2e3c42 100644 --- a/Hotel/HotelDataModels/Models/IReservation.cs +++ b/Hotel/HotelDataModels/Models/IReservationModel.cs @@ -1,9 +1,10 @@ namespace HotelDataModels.Models; -public interface IReservation : IId +public interface IReservationModel : IId { DateTime StartDate { get; } DateTime EndDate { get; } int GuestId { get; } int MaitreId { get; } + Dictionary ReservationsRooms { get; } } \ No newline at end of file diff --git a/Hotel/HotelDataModels/Models/IRoom.cs b/Hotel/HotelDataModels/Models/IRoomModel.cs similarity index 71% rename from Hotel/HotelDataModels/Models/IRoom.cs rename to Hotel/HotelDataModels/Models/IRoomModel.cs index 5e0b70a..2f00fb2 100644 --- a/Hotel/HotelDataModels/Models/IRoom.cs +++ b/Hotel/HotelDataModels/Models/IRoomModel.cs @@ -1,6 +1,6 @@ namespace HotelDataModels.Models; -public interface IRoom : IId +public interface IRoomModel : IId { string Type { get; } int Cost { get; }