diff --git a/JewelryStoreContracts/BindingModels/ClientBindingModel.cs b/JewelryStoreContracts/BindingModels/ClientBindingModel.cs new file mode 100644 index 0000000..3e4cf55 --- /dev/null +++ b/JewelryStoreContracts/BindingModels/ClientBindingModel.cs @@ -0,0 +1,18 @@ +using JewelryStoreDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JewelryStoreContracts.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/JewelryStoreContracts/BusinessLogicsContracts/IClientLogic.cs b/JewelryStoreContracts/BusinessLogicsContracts/IClientLogic.cs new file mode 100644 index 0000000..6109104 --- /dev/null +++ b/JewelryStoreContracts/BusinessLogicsContracts/IClientLogic.cs @@ -0,0 +1,20 @@ +using JewelryStoreContracts.BindingModels; +using JewelryStoreContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JewelryStoreContracts.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/JewelryStoreContracts/StoragesContracts/IClientStorage.cs b/JewelryStoreContracts/StoragesContracts/IClientStorage.cs new file mode 100644 index 0000000..ee3805f --- /dev/null +++ b/JewelryStoreContracts/StoragesContracts/IClientStorage.cs @@ -0,0 +1,20 @@ +using JewelryStoreContracts.BindingModels; +using JewelryStoreContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JewelryStoreContracts.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/JewelryStoreContracts/ViewModels/ClientViewModel.cs b/JewelryStoreContracts/ViewModels/ClientViewModel.cs new file mode 100644 index 0000000..fb12e3f --- /dev/null +++ b/JewelryStoreContracts/ViewModels/ClientViewModel.cs @@ -0,0 +1,21 @@ +using JewelryStoreDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JewelryStoreContracts.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/JewelryStoreDataModels/Models/IClientModel.cs b/JewelryStoreDataModels/Models/IClientModel.cs new file mode 100644 index 0000000..c24c063 --- /dev/null +++ b/JewelryStoreDataModels/Models/IClientModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace JewelryStoreDataModels.Models +{ + public interface IClientModel : IId + { + string ClientFIO { get; } + string Email { get; } + string Password { get; } + + } +}