diff --git a/BeautySalon/BeautySalon.sln b/BeautySalon/BeautySalon.sln
index d6fcc40..d55dc1e 100644
--- a/BeautySalon/BeautySalon.sln
+++ b/BeautySalon/BeautySalon.sln
@@ -5,6 +5,10 @@ VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalon", "BeautySalon.csproj", "{1D636E61-E3F0-4B64-998C-730FC76731F1}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalonDataModels", "..\BeautySalonDataModels\BeautySalonDataModels.csproj", "{3BE3FEC4-6794-4EA7-83BE-D382996DB168}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeautySalonContracts", "..\BeauySalonContracts\BeautySalonContracts.csproj", "{8CBBB8D6-5615-417B-82C5-B069EA84AB3C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +19,14 @@ Global
{1D636E61-E3F0-4B64-998C-730FC76731F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D636E61-E3F0-4B64-998C-730FC76731F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D636E61-E3F0-4B64-998C-730FC76731F1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3BE3FEC4-6794-4EA7-83BE-D382996DB168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3BE3FEC4-6794-4EA7-83BE-D382996DB168}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3BE3FEC4-6794-4EA7-83BE-D382996DB168}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3BE3FEC4-6794-4EA7-83BE-D382996DB168}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8CBBB8D6-5615-417B-82C5-B069EA84AB3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CBBB8D6-5615-417B-82C5-B069EA84AB3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8CBBB8D6-5615-417B-82C5-B069EA84AB3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8CBBB8D6-5615-417B-82C5-B069EA84AB3C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/BeautySalonDataModels/BeautySalonDataModels.csproj b/BeautySalonDataModels/BeautySalonDataModels.csproj
new file mode 100644
index 0000000..132c02c
--- /dev/null
+++ b/BeautySalonDataModels/BeautySalonDataModels.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
diff --git a/BeautySalonDataModels/IId.cs b/BeautySalonDataModels/IId.cs
new file mode 100644
index 0000000..f057750
--- /dev/null
+++ b/BeautySalonDataModels/IId.cs
@@ -0,0 +1,7 @@
+namespace BeautySalonDataModels
+{
+ public interface IId
+ {
+ int Id { get; }
+ }
+}
diff --git a/BeautySalonDataModels/Models/IClientModel.cs b/BeautySalonDataModels/Models/IClientModel.cs
new file mode 100644
index 0000000..3d9b2bc
--- /dev/null
+++ b/BeautySalonDataModels/Models/IClientModel.cs
@@ -0,0 +1,8 @@
+namespace BeautySalonDataModels.Models
+{
+ public interface IClientModel : IId
+ {
+ string ClientFIO { get; }
+ string PhoneNumber { get; }
+ }
+}
diff --git a/BeautySalonDataModels/Models/IMasterModel.cs b/BeautySalonDataModels/Models/IMasterModel.cs
new file mode 100644
index 0000000..412af99
--- /dev/null
+++ b/BeautySalonDataModels/Models/IMasterModel.cs
@@ -0,0 +1,9 @@
+namespace BeautySalonDataModels.Models
+{
+ public interface IMasterModel : IId
+ {
+ string MasterFIO { get; }
+ string Specialization { get; }
+ public Dictionary MasterServices { get; }
+ }
+}
diff --git a/BeautySalonDataModels/Models/IServiceModel.cs b/BeautySalonDataModels/Models/IServiceModel.cs
new file mode 100644
index 0000000..a43d978
--- /dev/null
+++ b/BeautySalonDataModels/Models/IServiceModel.cs
@@ -0,0 +1,8 @@
+namespace BeautySalonDataModels.Models
+{
+ public interface IServiceModel : IId
+ {
+ string ServiceName { get; }
+ double Cost { get; }
+ }
+}
diff --git a/BeautySalonDataModels/Models/IVisitModel.cs b/BeautySalonDataModels/Models/IVisitModel.cs
new file mode 100644
index 0000000..22e53c6
--- /dev/null
+++ b/BeautySalonDataModels/Models/IVisitModel.cs
@@ -0,0 +1,10 @@
+namespace BeautySalonDataModels.Models
+{
+ public interface IVisitModel : IId
+ {
+ DateTime DateOfVisit { get; }
+ int ClientId { get; }
+ int MasterId { get; }
+ int ServiceId { get; }
+ }
+}
diff --git a/BeauySalonContracts/BeautySalonContracts.csproj b/BeauySalonContracts/BeautySalonContracts.csproj
new file mode 100644
index 0000000..9c9950d
--- /dev/null
+++ b/BeauySalonContracts/BeautySalonContracts.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/BeauySalonContracts/BindingModels/ClientBindingModel.cs b/BeauySalonContracts/BindingModels/ClientBindingModel.cs
new file mode 100644
index 0000000..48f4252
--- /dev/null
+++ b/BeauySalonContracts/BindingModels/ClientBindingModel.cs
@@ -0,0 +1,11 @@
+using BeautySalonDataModels.Models;
+
+namespace BeautySalonContracts.BindingModels
+{
+ public class ClientBindingModel : IClientModel
+ {
+ public int Id { get; set; }
+ public string ClientFIO { get; set; } = string.Empty;
+ public string PhoneNumber { get; set; } = string.Empty;
+ }
+}
diff --git a/BeauySalonContracts/BindingModels/MasterBindingModel.cs b/BeauySalonContracts/BindingModels/MasterBindingModel.cs
new file mode 100644
index 0000000..6798f4d
--- /dev/null
+++ b/BeauySalonContracts/BindingModels/MasterBindingModel.cs
@@ -0,0 +1,11 @@
+using BeautySalonDataModels.Models;
+
+namespace BeautySalonContracts.BindingModels
+{
+ public class MasterBindingModel : IMasterModel
+ {
+ public int Id { get; set; }
+ public string MasterFIO { get; set; } = string.Empty;
+ public string Specialization { get; set; } = string.Empty;
+ }
+}
diff --git a/BeauySalonContracts/BindingModels/ServiceBindingModel.cs b/BeauySalonContracts/BindingModels/ServiceBindingModel.cs
new file mode 100644
index 0000000..4bf5afa
--- /dev/null
+++ b/BeauySalonContracts/BindingModels/ServiceBindingModel.cs
@@ -0,0 +1,11 @@
+using BeautySalonDataModels.Models;
+
+namespace BeautySalonContracts.BindingModels
+{
+ public class ServiceBindingModel : IServiceModel
+ {
+ public int Id { get; set; }
+ public string ServiceName { get; set; } = string.Empty;
+ public double Cost { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/BindingModels/VisitBindingModel.cs b/BeauySalonContracts/BindingModels/VisitBindingModel.cs
new file mode 100644
index 0000000..6182015
--- /dev/null
+++ b/BeauySalonContracts/BindingModels/VisitBindingModel.cs
@@ -0,0 +1,13 @@
+using BeautySalonDataModels.Models;
+
+namespace BeautySalonContracts.BindingModels
+{
+ public class VisitBindingModel : IVisitModel
+ {
+ public int Id { get; set; }
+ public DateTime DateOfVisit { get; set; }
+ public int ClientId { get; set; }
+ public int MasterId { get; set; }
+ public int ServiceId { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/BusinessLogicsContracts/IClientLogic.cs b/BeauySalonContracts/BusinessLogicsContracts/IClientLogic.cs
new file mode 100644
index 0000000..11e9008
--- /dev/null
+++ b/BeauySalonContracts/BusinessLogicsContracts/IClientLogic.cs
@@ -0,0 +1,15 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.BusinessLogicsContracts
+{
+ public interface IClientLogic
+ {
+ List? ReadList(ClientSearchModel? model);
+ ClientViewModel? ReadElement(ClientSearchModel model);
+ bool Create(ClientBindingModel model);
+ bool Update(ClientBindingModel model);
+ bool Delete(ClientBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/BusinessLogicsContracts/IMasterLogic.cs b/BeauySalonContracts/BusinessLogicsContracts/IMasterLogic.cs
new file mode 100644
index 0000000..7a6037d
--- /dev/null
+++ b/BeauySalonContracts/BusinessLogicsContracts/IMasterLogic.cs
@@ -0,0 +1,15 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.BusinessLogicsContracts
+{
+ public interface IMasterLogic
+ {
+ List? ReadList(MasterSearchModel? model);
+ MasterViewModel? ReadElement(MasterSearchModel model);
+ bool Create(MasterBindingModel model);
+ bool Update(MasterBindingModel model);
+ bool Delete(MasterBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/BusinessLogicsContracts/IServiceLogic.cs b/BeauySalonContracts/BusinessLogicsContracts/IServiceLogic.cs
new file mode 100644
index 0000000..e48d9a0
--- /dev/null
+++ b/BeauySalonContracts/BusinessLogicsContracts/IServiceLogic.cs
@@ -0,0 +1,15 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.BusinessLogicsContracts
+{
+ public interface IServiceLogic
+ {
+ List? ReadList(ServiceSearchModel? model);
+ ServiceViewModel? ReadElement(ServiceSearchModel model);
+ bool Create(ServiceBindingModel model);
+ bool Update(ServiceBindingModel model);
+ bool Delete(ServiceBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/BusinessLogicsContracts/IVisitLogic.cs b/BeauySalonContracts/BusinessLogicsContracts/IVisitLogic.cs
new file mode 100644
index 0000000..5785086
--- /dev/null
+++ b/BeauySalonContracts/BusinessLogicsContracts/IVisitLogic.cs
@@ -0,0 +1,15 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.BusinessLogicsContracts
+{
+ public interface IVisitLogic
+ {
+ List? ReadList(VisitSearchModel? model);
+ VisitViewModel? ReadElement(VisitSearchModel model);
+ bool Create(VisitBindingModel model);
+ bool Update(VisitBindingModel model);
+ bool Delete(VisitBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/SearchModels/ClientSearchModel.cs b/BeauySalonContracts/SearchModels/ClientSearchModel.cs
new file mode 100644
index 0000000..e3ecf72
--- /dev/null
+++ b/BeauySalonContracts/SearchModels/ClientSearchModel.cs
@@ -0,0 +1,9 @@
+namespace BeautySalonContracts.SearchModels
+{
+ public class ClientSearchModel
+ {
+ public int? Id { get; set; }
+ public string? ClientFIO { get; set; }
+ public string? PhoneNumber { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/SearchModels/MasterSearchModel.cs b/BeauySalonContracts/SearchModels/MasterSearchModel.cs
new file mode 100644
index 0000000..dcfd561
--- /dev/null
+++ b/BeauySalonContracts/SearchModels/MasterSearchModel.cs
@@ -0,0 +1,9 @@
+namespace BeautySalonContracts.SearchModels
+{
+ public class MasterSearchModel
+ {
+ public int? Id { get; set; }
+ public string? MasterFIO { get; set; }
+ public string? Specilization { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/SearchModels/ServiceSearchModel.cs b/BeauySalonContracts/SearchModels/ServiceSearchModel.cs
new file mode 100644
index 0000000..abb967a
--- /dev/null
+++ b/BeauySalonContracts/SearchModels/ServiceSearchModel.cs
@@ -0,0 +1,8 @@
+namespace BeautySalonContracts.SearchModels
+{
+ public class ServiceSearchModel
+ {
+ public int? Id { get; set; }
+ public string? ServiceName { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/SearchModels/VisitSearchModel.cs b/BeauySalonContracts/SearchModels/VisitSearchModel.cs
new file mode 100644
index 0000000..c7f1a35
--- /dev/null
+++ b/BeauySalonContracts/SearchModels/VisitSearchModel.cs
@@ -0,0 +1,7 @@
+namespace BeautySalonContracts.SearchModels
+{
+ public class VisitSearchModel
+ {
+ public int? Id { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/StoragesContracts/IClientStorage.cs b/BeauySalonContracts/StoragesContracts/IClientStorage.cs
new file mode 100644
index 0000000..22ab9c4
--- /dev/null
+++ b/BeauySalonContracts/StoragesContracts/IClientStorage.cs
@@ -0,0 +1,16 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.StoragesContracts
+{
+ public interface IClientStorage
+ {
+ List GetFullList();
+ List GetFilteredList(ClientSearchModel model);
+ ClientViewModel? GetElement(ClientSearchModel model);
+ ClientViewModel? Insert(ClientBindingModel model);
+ ClientViewModel? Update(ClientBindingModel model);
+ ClientViewModel? Delete(ClientBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/StoragesContracts/IMasterStorage.cs b/BeauySalonContracts/StoragesContracts/IMasterStorage.cs
new file mode 100644
index 0000000..d708b9d
--- /dev/null
+++ b/BeauySalonContracts/StoragesContracts/IMasterStorage.cs
@@ -0,0 +1,16 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.StoragesContracts
+{
+ public interface IMasterStorage
+ {
+ List GetFullList();
+ List GetFilteredList(MasterSearchModel model);
+ MasterViewModel? GetElement(MasterSearchModel model);
+ MasterViewModel? Insert(MasterBindingModel model);
+ MasterViewModel? Update(MasterBindingModel model);
+ MasterViewModel? Delete(MasterBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/StoragesContracts/IServiceStorage.cs b/BeauySalonContracts/StoragesContracts/IServiceStorage.cs
new file mode 100644
index 0000000..f4052be
--- /dev/null
+++ b/BeauySalonContracts/StoragesContracts/IServiceStorage.cs
@@ -0,0 +1,16 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.StoragesContracts
+{
+ public interface IServiceStorage
+ {
+ List GetFullList();
+ List GetFilteredList(ServiceSearchModel model);
+ ServiceViewModel? GetElement(ServiceSearchModel model);
+ ServiceViewModel? Insert(ServiceBindingModel model);
+ ServiceViewModel? Update(ServiceBindingModel model);
+ ServiceViewModel? Delete(ServiceBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/StoragesContracts/IVisitStorage.cs b/BeauySalonContracts/StoragesContracts/IVisitStorage.cs
new file mode 100644
index 0000000..7c8e2b9
--- /dev/null
+++ b/BeauySalonContracts/StoragesContracts/IVisitStorage.cs
@@ -0,0 +1,16 @@
+using BeautySalonContracts.BindingModels;
+using BeautySalonContracts.SearchModels;
+using BeautySalonContracts.ViewModels;
+
+namespace BeautySalonContracts.StoragesContracts
+{
+ public interface IVisitStorage
+ {
+ List GetFullList();
+ List GetFilteredList(VisitSearchModel model);
+ VisitViewModel? GetElement(VisitSearchModel model);
+ VisitViewModel? Insert(VisitBindingModel model);
+ VisitViewModel? Update(VisitBindingModel model);
+ VisitViewModel? Delete(VisitBindingModel model);
+ }
+}
diff --git a/BeauySalonContracts/ViewModels/ClientViewModel.cs b/BeauySalonContracts/ViewModels/ClientViewModel.cs
new file mode 100644
index 0000000..b6e2d2c
--- /dev/null
+++ b/BeauySalonContracts/ViewModels/ClientViewModel.cs
@@ -0,0 +1,14 @@
+using BeautySalonDataModels.Models;
+using System.ComponentModel;
+
+namespace BeautySalonContracts.ViewModels
+{
+ public class ClientViewModel : IClientModel
+ {
+ public int Id { get; set; }
+ [DisplayName("ФИО клиента")]
+ public string ClientFIO { get; set; } = string.Empty;
+ [DisplayName("Номер телефона")]
+ public string PhoneNumber { get; set; } = string.Empty;
+ }
+}
diff --git a/BeauySalonContracts/ViewModels/MasterViewModel.cs b/BeauySalonContracts/ViewModels/MasterViewModel.cs
new file mode 100644
index 0000000..d579515
--- /dev/null
+++ b/BeauySalonContracts/ViewModels/MasterViewModel.cs
@@ -0,0 +1,15 @@
+using BeautySalonDataModels.Models;
+using System.ComponentModel;
+
+namespace BeautySalonContracts.ViewModels
+{
+ public class MasterViewModel : IMasterModel
+ {
+ public int Id { get; set; }
+ [DisplayName("ФИО мастера")]
+ public string MasterFIO { get; set; } = string.Empty;
+ [DisplayName("Специализация")]
+ public string Specialization { get; set; } = string.Empty;
+ public Dictionary MasterServices { get; set; } = new();
+ }
+}
diff --git a/BeauySalonContracts/ViewModels/ServiceViewModel.cs b/BeauySalonContracts/ViewModels/ServiceViewModel.cs
new file mode 100644
index 0000000..6f350b7
--- /dev/null
+++ b/BeauySalonContracts/ViewModels/ServiceViewModel.cs
@@ -0,0 +1,14 @@
+using BeautySalonDataModels.Models;
+using System.ComponentModel;
+
+namespace BeautySalonContracts.ViewModels
+{
+ public class ServiceViewModel : IServiceModel
+ {
+ public int Id { get; set; }
+ [DisplayName("Название услуги")]
+ public string ServiceName { get; set; } = string.Empty;
+ [DisplayName("Цена")]
+ public double Cost { get; set; }
+ }
+}
diff --git a/BeauySalonContracts/ViewModels/VisitViewModel.cs b/BeauySalonContracts/ViewModels/VisitViewModel.cs
new file mode 100644
index 0000000..ea77b51
--- /dev/null
+++ b/BeauySalonContracts/ViewModels/VisitViewModel.cs
@@ -0,0 +1,13 @@
+using BeautySalonDataModels.Models;
+
+namespace BeautySalonContracts.ViewModels
+{
+ public class VisitViewModel : IVisitModel
+ {
+ public int Id { get; set; }
+ public DateTime DateOfVisit { get; set; }
+ public int ClientId { get; set; }
+ public int MasterId { get; set; }
+ public int ServiceId { get; set; }
+ }
+}