Почти доделал контракты, остались View
This commit is contained in:
parent
e85ce78568
commit
b9047f1c48
@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelView", "HotelView\Hote
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelDataModels", "HotelDataModels\HotelDataModels.csproj", "{311319D0-3CD8-48F0-8258-017FBD83728D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelDataModels", "HotelDataModels\HotelDataModels.csproj", "{311319D0-3CD8-48F0-8258-017FBD83728D}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HotelContracts", "HotelContracts\HotelContracts.csproj", "{85D5192D-24CF-48CD-800F-BE5E02B738B6}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -21,6 +23,10 @@ Global
|
|||||||
{311319D0-3CD8-48F0-8258-017FBD83728D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{311319D0-3CD8-48F0-8258-017FBD83728D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{311319D0-3CD8-48F0-8258-017FBD83728D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{311319D0-3CD8-48F0-8258-017FBD83728D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{311319D0-3CD8-48F0-8258-017FBD83728D}.Release|Any CPU.Build.0 = Release|Any CPU
|
{311319D0-3CD8-48F0-8258-017FBD83728D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{85D5192D-24CF-48CD-800F-BE5E02B738B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{85D5192D-24CF-48CD-800F-BE5E02B738B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{85D5192D-24CF-48CD-800F-BE5E02B738B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{85D5192D-24CF-48CD-800F-BE5E02B738B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
28
Hotel/HotelContracts/BindingModels/BookingBindingModel.cs
Normal file
28
Hotel/HotelContracts/BindingModels/BookingBindingModel.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HotelDataModels.Enums;
|
||||||
|
using HotelDataModels.Models;
|
||||||
|
|
||||||
|
namespace HotelContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class BookingBindingModel : IBookingModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int RoomId { get; set; }
|
||||||
|
|
||||||
|
public int ClientId { get; set; }
|
||||||
|
|
||||||
|
public DateTime ArrivalDate { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public DateTime DepartureDate { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public int NumberHoursSpent { get; set; }
|
||||||
|
|
||||||
|
public AcceptanceStatus Status { get; set; } = AcceptanceStatus.Неизвестен;
|
||||||
|
|
||||||
|
public int TotalCost { get; set; }
|
||||||
|
}
|
||||||
|
}
|
24
Hotel/HotelContracts/BindingModels/ClientBindingModel.cs
Normal file
24
Hotel/HotelContracts/BindingModels/ClientBindingModel.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using HotelDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ClientBindingModel : IClientModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Surname { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime DateOfBirth { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public string PhoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
16
Hotel/HotelContracts/BindingModels/PostBindingModel.cs
Normal file
16
Hotel/HotelContracts/BindingModels/PostBindingModel.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using HotelDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class PostBindingModel : IPostModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string PostName { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
26
Hotel/HotelContracts/BindingModels/RoomBindingModel.cs
Normal file
26
Hotel/HotelContracts/BindingModels/RoomBindingModel.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HotelDataModels.Models;
|
||||||
|
|
||||||
|
namespace HotelContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class RoomBindingModel : IRoomModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int WorkerId { get; set; }
|
||||||
|
|
||||||
|
public int Number { get; set; }
|
||||||
|
|
||||||
|
public int Floor { get; set; }
|
||||||
|
|
||||||
|
public int NumberOfBeds { get; set; }
|
||||||
|
|
||||||
|
public string Condition { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int Cost { get; set; }
|
||||||
|
}
|
||||||
|
}
|
26
Hotel/HotelContracts/BindingModels/WorkerBindingModel.cs
Normal file
26
Hotel/HotelContracts/BindingModels/WorkerBindingModel.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using HotelDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class WorkerBindingModel : IWorkerModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int PostId { get; set; }
|
||||||
|
|
||||||
|
public string FIO { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime DateOfBirth { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public int WorkExperience { get; set; }
|
||||||
|
|
||||||
|
public int Salary { get; set; }
|
||||||
|
|
||||||
|
public string Phone { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IBookingLogic
|
||||||
|
{
|
||||||
|
List<BookingViewModel>? ReadList(BookingSearchModel? model);
|
||||||
|
BookingViewModel? ReadElement(BookingSearchModel model);
|
||||||
|
|
||||||
|
bool Create(BookingBindingModel model);
|
||||||
|
bool Update(BookingBindingModel model);
|
||||||
|
bool Delete(BookingBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
Hotel/HotelContracts/BusinessLogicsContracts/IClientLogic.cs
Normal file
21
Hotel/HotelContracts/BusinessLogicsContracts/IClientLogic.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IClientLogic
|
||||||
|
{
|
||||||
|
List<ClientViewModel>? ReadList(ClientSearchModel? model);
|
||||||
|
ClientViewModel? ReadElement(ClientSearchModel model);
|
||||||
|
|
||||||
|
bool Create(ClientBindingModel model);
|
||||||
|
bool Update(ClientBindingModel model);
|
||||||
|
bool Delete(ClientBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
Hotel/HotelContracts/BusinessLogicsContracts/IPostLogic.cs
Normal file
21
Hotel/HotelContracts/BusinessLogicsContracts/IPostLogic.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IPostLogic
|
||||||
|
{
|
||||||
|
List<PostViewModel>? ReadList(PostSearchModel? model);
|
||||||
|
PostViewModel? ReadElement(PostSearchModel model);
|
||||||
|
|
||||||
|
bool Create(PostBindingModel model);
|
||||||
|
bool Update(PostBindingModel model);
|
||||||
|
bool Delete(PostBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
Hotel/HotelContracts/BusinessLogicsContracts/IRoomLogic.cs
Normal file
21
Hotel/HotelContracts/BusinessLogicsContracts/IRoomLogic.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IRoomLogic
|
||||||
|
{
|
||||||
|
List<RoomViewModel>? ReadList(RoomSearchModel? model);
|
||||||
|
RoomViewModel? ReadElement(RoomSearchModel model);
|
||||||
|
|
||||||
|
bool Create(RoomBindingModel model);
|
||||||
|
bool Update(RoomBindingModel model);
|
||||||
|
bool Delete(RoomBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
21
Hotel/HotelContracts/BusinessLogicsContracts/IWorkerLogic.cs
Normal file
21
Hotel/HotelContracts/BusinessLogicsContracts/IWorkerLogic.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.BusinessLogicsContracts
|
||||||
|
{
|
||||||
|
public interface IWorkerLogic
|
||||||
|
{
|
||||||
|
List<WorkerViewModel>? ReadList(WorkerSearchModel? model);
|
||||||
|
WorkerViewModel? ReadElement(WorkerSearchModel model);
|
||||||
|
|
||||||
|
bool Create(WorkerBindingModel model);
|
||||||
|
bool Update(WorkerBindingModel model);
|
||||||
|
bool Delete(WorkerBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
13
Hotel/HotelContracts/HotelContracts.csproj
Normal file
13
Hotel/HotelContracts/HotelContracts.csproj
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\HotelDataModels\HotelDataModels.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
14
Hotel/HotelContracts/SearchModels/BookingSearchModel.cs
Normal file
14
Hotel/HotelContracts/SearchModels/BookingSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class BookingSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
14
Hotel/HotelContracts/SearchModels/ClientSearchModel.cs
Normal file
14
Hotel/HotelContracts/SearchModels/ClientSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class ClientSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
14
Hotel/HotelContracts/SearchModels/PostSearchModel.cs
Normal file
14
Hotel/HotelContracts/SearchModels/PostSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class PostSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? PostName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
14
Hotel/HotelContracts/SearchModels/RoomSearchModel.cs
Normal file
14
Hotel/HotelContracts/SearchModels/RoomSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class RoomSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public int? Number { get; set; }
|
||||||
|
}
|
||||||
|
}
|
14
Hotel/HotelContracts/SearchModels/WorkerSearchModel.cs
Normal file
14
Hotel/HotelContracts/SearchModels/WorkerSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class WorkerSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public int? FIO { get; set; }
|
||||||
|
}
|
||||||
|
}
|
22
Hotel/HotelContracts/StoragesContracts/IBookingStorage.cs
Normal file
22
Hotel/HotelContracts/StoragesContracts/IBookingStorage.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IBookingStorage
|
||||||
|
{
|
||||||
|
List<BookingViewModel> GetFullList();
|
||||||
|
List<BookingViewModel> GetFilteredList(BookingSearchModel model);
|
||||||
|
|
||||||
|
BookingViewModel? GetElement(BookingSearchModel model);
|
||||||
|
BookingViewModel? Insert(BookingBindingModel model);
|
||||||
|
BookingViewModel? Update(BookingBindingModel model);
|
||||||
|
BookingViewModel? Delete(BookingBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
22
Hotel/HotelContracts/StoragesContracts/IClientStorage.cs
Normal file
22
Hotel/HotelContracts/StoragesContracts/IClientStorage.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IClientStorage
|
||||||
|
{
|
||||||
|
List<ClientViewModel> GetFullList();
|
||||||
|
List<ClientViewModel> GetFilteredList(ClientSearchModel model);
|
||||||
|
|
||||||
|
ClientViewModel? GetElement(ClientSearchModel model);
|
||||||
|
ClientViewModel? Insert(ClientBindingModel model);
|
||||||
|
ClientViewModel? Update(ClientBindingModel model);
|
||||||
|
ClientViewModel? Delete(ClientBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
22
Hotel/HotelContracts/StoragesContracts/IPostStorage.cs
Normal file
22
Hotel/HotelContracts/StoragesContracts/IPostStorage.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IPostStorage
|
||||||
|
{
|
||||||
|
List<PostViewModel> GetFullList();
|
||||||
|
List<PostViewModel> GetFilteredList(PostSearchModel model);
|
||||||
|
|
||||||
|
PostViewModel? GetElement(PostSearchModel model);
|
||||||
|
PostViewModel? Insert(PostBindingModel model);
|
||||||
|
PostViewModel? Update(PostBindingModel model);
|
||||||
|
PostViewModel? Delete(PostBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
22
Hotel/HotelContracts/StoragesContracts/IRoomStorage.cs
Normal file
22
Hotel/HotelContracts/StoragesContracts/IRoomStorage.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IRoomStorage
|
||||||
|
{
|
||||||
|
List<RoomViewModel> GetFullList();
|
||||||
|
List<RoomViewModel> GetFilteredList(RoomSearchModel model);
|
||||||
|
|
||||||
|
RoomViewModel? GetElement(RoomSearchModel model);
|
||||||
|
RoomViewModel? Insert(RoomBindingModel model);
|
||||||
|
RoomViewModel? Update(RoomBindingModel model);
|
||||||
|
RoomViewModel? Delete(RoomBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
22
Hotel/HotelContracts/StoragesContracts/IWorkerStorage.cs
Normal file
22
Hotel/HotelContracts/StoragesContracts/IWorkerStorage.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using HotelContracts.BindingModels;
|
||||||
|
using HotelContracts.SearchModels;
|
||||||
|
using HotelContracts.ViewModels;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.StoragesContracts
|
||||||
|
{
|
||||||
|
public interface IWorkerStorage
|
||||||
|
{
|
||||||
|
List<WorkerViewModel> GetFullList();
|
||||||
|
List<WorkerViewModel> GetFilteredList(WorkerSearchModel model);
|
||||||
|
|
||||||
|
WorkerViewModel? GetElement(WorkerSearchModel model);
|
||||||
|
WorkerViewModel? Insert(WorkerBindingModel model);
|
||||||
|
WorkerViewModel? Update(WorkerBindingModel model);
|
||||||
|
WorkerViewModel? Delete(WorkerBindingModel model);
|
||||||
|
}
|
||||||
|
}
|
12
Hotel/HotelContracts/ViewModels/BookingViewModel.cs
Normal file
12
Hotel/HotelContracts/ViewModels/BookingViewModel.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class BookingViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
12
Hotel/HotelContracts/ViewModels/ClientViewModel.cs
Normal file
12
Hotel/HotelContracts/ViewModels/ClientViewModel.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class ClientViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
12
Hotel/HotelContracts/ViewModels/PostViewModel.cs
Normal file
12
Hotel/HotelContracts/ViewModels/PostViewModel.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class PostViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
12
Hotel/HotelContracts/ViewModels/RoomViewModel.cs
Normal file
12
Hotel/HotelContracts/ViewModels/RoomViewModel.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class RoomViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
26
Hotel/HotelContracts/ViewModels/WorkerViewModel.cs
Normal file
26
Hotel/HotelContracts/ViewModels/WorkerViewModel.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using HotelDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace HotelContracts.ViewModels
|
||||||
|
{
|
||||||
|
public class WorkerViewModel : IWorkerModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int PostId { get; set; }
|
||||||
|
|
||||||
|
public string FIO { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime DateOfBirth { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public int WorkExperience { get; set; }
|
||||||
|
|
||||||
|
public int Salary { get; set; }
|
||||||
|
|
||||||
|
public string Phone { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -9,7 +9,7 @@ namespace HotelDataModels.Enums
|
|||||||
public enum AcceptanceStatus
|
public enum AcceptanceStatus
|
||||||
{
|
{
|
||||||
Неизвестен = -1,
|
Неизвестен = -1,
|
||||||
Получин = 0,
|
Обработка = 0,
|
||||||
Принимается = 1,
|
Принимается = 1,
|
||||||
Принят = 2
|
Принят = 2
|
||||||
}
|
}
|
||||||
|
@ -7,14 +7,14 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace HotelDataModels.Models
|
namespace HotelDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IBooking : IId
|
public interface IBookingModel : IId
|
||||||
{
|
{
|
||||||
int RoomId { get; }
|
int RoomId { get; }
|
||||||
int ClientId { get; }
|
int ClientId { get; }
|
||||||
DateTime ArrivalDate { get; }
|
DateTime ArrivalDate { get; }
|
||||||
DateTime DepartureDate { get; }
|
DateTime DepartureDate { get; }
|
||||||
int NumberHoursSpent { get; }
|
int NumberHoursSpent { get; }
|
||||||
AcceptanceStatus Status { get; }
|
Enums.AcceptanceStatus Status { get; }
|
||||||
int TotalCost { get; }
|
int TotalCost { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,11 +7,13 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace HotelDataModels.Models
|
namespace HotelDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IClient : IId
|
public interface IClientModel : IId
|
||||||
{
|
{
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
string Surname { get; }
|
string Surname { get; }
|
||||||
DateOnly DateOfBirth { get; }
|
DateTime DateOfBirth { get; }
|
||||||
string PhoneNumber { get; }
|
string PhoneNumber { get; }
|
||||||
|
|
||||||
|
string Password { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace HotelDataModels.Models
|
namespace HotelDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IPost : IId
|
public interface IPostModel : IId
|
||||||
{
|
{
|
||||||
string PostName { get; }
|
string PostName { get; }
|
||||||
}
|
}
|
@ -6,9 +6,9 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace HotelDataModels.Models
|
namespace HotelDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IRoom : IId
|
public interface IRoomModel : IId
|
||||||
{
|
{
|
||||||
int MaidId { get; }
|
int WorkerId { get; }
|
||||||
int Number { get; }
|
int Number { get; }
|
||||||
int Floor { get; }
|
int Floor { get; }
|
||||||
int NumberOfBeds { get; }
|
int NumberOfBeds { get; }
|
@ -6,13 +6,11 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace HotelDataModels.Models
|
namespace HotelDataModels.Models
|
||||||
{
|
{
|
||||||
public interface IWorker : IId
|
public interface IWorkerModel : IId
|
||||||
{
|
{
|
||||||
int PostId { get; }
|
int PostId { get; }
|
||||||
string Surname { get; }
|
string FIO { get; }
|
||||||
string Name { get; }
|
DateTime DateOfBirth { get; }
|
||||||
string Patronymic { get; }
|
|
||||||
DateOnly DateOfBirth { get; }
|
|
||||||
int WorkExperience { get; }
|
int WorkExperience { get; }
|
||||||
int Salary { get; }
|
int Salary { get; }
|
||||||
string Phone { get; }
|
string Phone { get; }
|
Loading…
x
Reference in New Issue
Block a user