diff --git a/ConfectionaryBusinessLogic/ClientLogic.cs b/ConfectionaryBusinessLogic/ClientLogic.cs new file mode 100644 index 0000000..53a0137 --- /dev/null +++ b/ConfectionaryBusinessLogic/ClientLogic.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConfectioneryBusinessLogic +{ + internal class ClientLogic + { + } +} diff --git a/ConfectioneryContracts/BindingModels/ClientBindingModel.cs b/ConfectioneryContracts/BindingModels/ClientBindingModel.cs new file mode 100644 index 0000000..b27bc98 --- /dev/null +++ b/ConfectioneryContracts/BindingModels/ClientBindingModel.cs @@ -0,0 +1,17 @@ +using ConfectioneryDataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConfectioneryContracts.BindingModels +{ + public class ClientBindingModel : IClientModel + { + public int Id { get; set; } + public string ClientFIO { get; set; } = string.Empty; + public string Email { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + } +} diff --git a/ConfectioneryContracts/BusinessLogicsContracts/IClientLogic.cs b/ConfectioneryContracts/BusinessLogicsContracts/IClientLogic.cs new file mode 100644 index 0000000..d5ac6d1 --- /dev/null +++ b/ConfectioneryContracts/BusinessLogicsContracts/IClientLogic.cs @@ -0,0 +1,15 @@ +using ConfectioneryContracts.BindingModels; +using ConfectioneryContracts.SearchModels; +using ConfectioneryContracts.ViewModels; + +namespace ConfectioneryContracts.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/ConfectioneryContracts/SearchModels/ClientSearchModel.cs b/ConfectioneryContracts/SearchModels/ClientSearchModel.cs new file mode 100644 index 0000000..f408cba --- /dev/null +++ b/ConfectioneryContracts/SearchModels/ClientSearchModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConfectioneryContracts.SearchModels +{ + public class ClientSearchModel + { + public int? Id { get; set; } + + public string? Email { get; set; } + } +} diff --git a/ConfectioneryContracts/StoragesContract/IClientStorage.cs b/ConfectioneryContracts/StoragesContract/IClientStorage.cs new file mode 100644 index 0000000..db285d4 --- /dev/null +++ b/ConfectioneryContracts/StoragesContract/IClientStorage.cs @@ -0,0 +1,21 @@ +using ConfectioneryContracts.BindingModels; +using ConfectioneryContracts.SearchModels; +using ConfectioneryContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConfectioneryContracts.StoragesContract +{ + 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/ConfectioneryContracts/ViewModels/ClientViewModel.cs b/ConfectioneryContracts/ViewModels/ClientViewModel.cs new file mode 100644 index 0000000..fc3d9e8 --- /dev/null +++ b/ConfectioneryContracts/ViewModels/ClientViewModel.cs @@ -0,0 +1,21 @@ +using ConfectioneryDataModels; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConfectioneryContracts.ViewModels +{ + public class ClientViewModel : IClientModel + { + public int Id { get; set; } + [DisplayName("ФИО клиента")] + public string ClientFIO { get; set; } = string.Empty; + [DisplayName("Логин (эл. почта)")] + public string Email { get; set; } = string.Empty; + [DisplayName("Пароль")] + public string Password { get; set; } = string.Empty; + } +} diff --git a/ConfectioneryDataModels/IClientModel.cs b/ConfectioneryDataModels/IClientModel.cs new file mode 100644 index 0000000..5dc5995 --- /dev/null +++ b/ConfectioneryDataModels/IClientModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConfectioneryDataModels +{ + public interface IClientModel : IId + { + string ClientFIO { get; } + string Email { get; } + string Password { get; } + } +}