From 1cd297eec8ae844ee0f29ad0c5f5c66cdf918219 Mon Sep 17 00:00:00 2001 From: Viltskaa Date: Thu, 6 Apr 2023 17:55:58 +0400 Subject: [PATCH] Edit binding models --- .../BindingModels/CleaningBindingModel.cs | 8 ++++---- .../BindingModels/CleaningInstrumentsBindingModel.cs | 4 ++-- .../BindingModels/GuestBindingModel.cs | 8 ++++---- .../BindingModels/MaitreBindingModel.cs | 10 +++++----- .../BindingModels/ReservationBindingModel.cs | 12 ++++++------ .../HotelContracts/BindingModels/RoomBindingModel.cs | 6 +++--- Hotel/HotelDataModels/Models/IRoomModel.cs | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs b/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs index 6737fa0..f9ad09a 100644 --- a/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/CleaningBindingModel.cs @@ -4,8 +4,8 @@ namespace HotelContracts.BindingModels; public class CleaningBindingModel : ICleaningModel { - public int Id { get; } - public DateTime Date { get; } - public int RoomId { get; } - public Dictionary CleaningInstruments { get; } + public int Id { get; set; } + public DateTime Date { get; set; } + public int RoomId { get; set; } + public Dictionary CleaningInstruments { get; set; } } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs b/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs index 0d7c482..9e25aff 100644 --- a/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/CleaningInstrumentsBindingModel.cs @@ -4,6 +4,6 @@ namespace HotelContracts.BindingModels; public class CleaningInstrumentsBindingModel : ICleaningInstrumentsModel { - public int Id { get; } - public string Type { get; } + public int Id { get; set; } + public string Type { get; set; } = string.Empty; } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs b/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs index 4d17bcd..2e6dd80 100644 --- a/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/GuestBindingModel.cs @@ -4,8 +4,8 @@ namespace HotelContracts.BindingModels; public class GuestBindingModel : IGuestModel { - public int Id { get; } - public string Name { get; } - public string SecondName { get; } - public string LastName { get; } + 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; } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs b/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs index bd8cdc7..5ee71c5 100644 --- a/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/MaitreBindingModel.cs @@ -5,9 +5,9 @@ namespace HotelContracts.BindingModels; public class MaitreModelBindingModel : IMaitreModel { public int Id { get; } - public string Name { get; } - public string SecondName { get; } - public string LastName { get; } - public string Login { get; } - public string Password { get; } + 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; } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs b/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs index 9132c10..fdc983f 100644 --- a/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/ReservationBindingModel.cs @@ -4,10 +4,10 @@ namespace HotelContracts.BindingModels; 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; } + public int Id { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public int GuestId { get; set; } + public int MaitreId { get; set; } + public Dictionary ReservationsRooms { get; set; } } \ No newline at end of file diff --git a/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs b/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs index 735b475..f8887d6 100644 --- a/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs +++ b/Hotel/HotelContracts/BindingModels/RoomBindingModel.cs @@ -4,7 +4,7 @@ namespace HotelContracts.BindingModels; public class RoomModelBindingModel : IRoomModel { - public int Id { get; } - public string Type { get; } - public int Cost { get; } + public int Id { get; set; } + public string Type { get; set; } + public double Cost { get; set; } } \ No newline at end of file diff --git a/Hotel/HotelDataModels/Models/IRoomModel.cs b/Hotel/HotelDataModels/Models/IRoomModel.cs index 2f00fb2..d918cd6 100644 --- a/Hotel/HotelDataModels/Models/IRoomModel.cs +++ b/Hotel/HotelDataModels/Models/IRoomModel.cs @@ -3,5 +3,5 @@ public interface IRoomModel : IId { string Type { get; } - int Cost { get; } + double Cost { get; } } \ No newline at end of file