diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs new file mode 100644 index 0000000..b3c825b --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs @@ -0,0 +1,14 @@ +using ElectronicsShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.BindingModels { + public class ClientBindingModel : IClientModel { + public int UserID { get; set; } + + public string Email { get; set; } = string.Empty; + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ImplementerBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ImplementerBindingModel.cs new file mode 100644 index 0000000..017418c --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ImplementerBindingModel.cs @@ -0,0 +1,15 @@ +using ElectronicsShopDataModels.Enums; +using ElectronicsShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.BindingModels { + public class ImplementerBindingModel : IImplementerModel { + public int UserID { get; set; } + + public Quakifications Qualification { get; set; } = Quakifications.Отсутствует; + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/OrderBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/OrderBindingModel.cs index 93f602f..e27f078 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/OrderBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/OrderBindingModel.cs @@ -12,18 +12,17 @@ namespace ElectronicsShopContracts.BindingModels { public int ID { get; set; } public int UserID { get; set; } - - public double Sum { get; set; } + public int? ImplementerID { get; set; } + public int PaymentID { get; set; } + public double Sum { get; set; } public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; - public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно; public DateTime DateCreate { get; set; } = DateTime.Now; - public DateTime? DateImplement { get; set; } public Dictionary ProductList { get; set; } = new(); - } + } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs index dabd5fa..c174dfe 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs @@ -8,25 +8,12 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.BindingModels { - public class UserBindingModel : IUserModel - { - //ID пользователя - public int ID { get; set; } - //ID роли (клиент) - public int RoleID { get; set; } + public class UserBindingModel : IUserModel { + public int ID { get; set; } - - public string FirstName { get; set; } = string.Empty; - - public string LastName { get; set; } = string.Empty; - - public string Login { get; set; } = string.Empty; - - public string Email { get; set; } = string.Empty; - - public string Password { get; set; } = string.Empty; - - public string PhoneNumber { get; set; } = string.Empty; - - } + public int RoleID { get; set; } + public string UserFIO { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + public string Login { get; set; } = string.Empty; + } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs new file mode 100644 index 0000000..6b132ac --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs @@ -0,0 +1,19 @@ +using ElectronicsShopContracts.BindingModels; +using ElectronicsShopContracts.SearchModels; +using ElectronicsShopContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.BusinessLogicContracts { + public interface IClientLogic { + List? ReadList(ClientSearchModel? model); + ClientViewModel? ReadElemet(ClientSearchModel model); + + bool Add(ClientBindingModel model); + bool Update(ClientBindingModel model); + bool Delete(ClientBindingModel model); + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IImplementerLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IImplementerLogic.cs new file mode 100644 index 0000000..6e02a7e --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IImplementerLogic.cs @@ -0,0 +1,19 @@ +using ElectronicsShopContracts.BindingModels; +using ElectronicsShopContracts.SearchModels; +using ElectronicsShopContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.BusinessLogicContracts { + public interface IImplementerLogic { + List? ReadList(ImplementerSearchModel? model); + ImplementerViewModel? ReadElemet(ImplementerSearchModel model); + + bool Add(ImplementerBindingModel model); + bool Update(ImplementerBindingModel model); + bool Delete(ImplementerBindingModel model); + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs index 26f1b3c..cc68b08 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs @@ -12,6 +12,7 @@ namespace ElectronicsShopContracts.BusinessLogicContracts public interface IOrderLogic { List? ReadList(OrderSearchModel? model); + OrderViewModel? ReadElement(OrderSearchModel model); bool CreateOrder(OrderBindingModel model); bool TakeOrderInWork(OrderBindingModel model); diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs index a735e43..599cdcd 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs @@ -12,7 +12,7 @@ namespace ElectronicsShopContracts.BusinessLogicContracts public interface IUserLogic { List? ReadList(UserSearchModel? model); - UserViewModel? ReadElemet(UserSearchModel? model); + UserViewModel? ReadElemet(UserSearchModel model); bool Add(UserBindingModel model); bool Update(UserBindingModel model); diff --git a/ElectronicsShop/ElectronicsShopDataModels/Enums/Quakifications.cs b/ElectronicsShop/ElectronicsShopDataModels/Enums/Quakifications.cs new file mode 100644 index 0000000..7177a81 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopDataModels/Enums/Quakifications.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopDataModels.Enums { + public enum Quakifications { + Отсутствует = -1 + } +} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs new file mode 100644 index 0000000..588c411 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopDataModels.Models { + public interface IClientModel { + int UserID { get; } + string Email { get; } + } +} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IImplementerModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IImplementerModel.cs new file mode 100644 index 0000000..0a77ae6 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IImplementerModel.cs @@ -0,0 +1,13 @@ +using ElectronicsShopDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopDataModels.Models { + public interface IImplementerModel { + int UserID { get; } + Quakifications Qualification { get; } + } +} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs index 816c3dc..e3453b8 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs @@ -10,9 +10,9 @@ namespace ElectronicsShopDataModels.Models public interface IOrderModel : IID { int UserID { get; } - int ImplementerID { get; } + int? ImplementerID { get; } int PaymentID { get; } - OrderStatus OrderStatus { get; } + OrderStatus Status { get; } PaymeantOption PaymeantOption { get; } DateTime DateCreate { get; } DateTime? DateImplement { get; } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs index 3c69672..11e541e 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs @@ -8,14 +8,10 @@ namespace ElectronicsShopDataModels { public interface IUserModel : IID { - //ID role int RoleID { get; } - string FirstName { get; } - string LastName { get; } + string UserFIO { get; } string Password { get; } - string PhoneNumber { get; } string Login { get; } - string Email { get; } } }