diff --git a/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/PayLogic.cs b/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/PayLogic.cs index d4513ee..bb97fde 100644 --- a/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/PayLogic.cs +++ b/ElectronicsShop/ElectronicsShopBusinessLogic/BusinessLogic/PayLogic.cs @@ -8,22 +8,22 @@ using Microsoft.Extensions.Logging; namespace ElectronicsShopBusinessLogic.BusinessLogic { - public class PayLogic : IPayLogic + public class PayLogic : IPaymentLogic { private readonly ILogger _logger; - private readonly IPayStorage _storage; + private readonly IPaymentStorage _storage; - public bool CreatePay(PayBindingModel model) + public bool CreatePay(PaymentBindingModel model) { throw new NotImplementedException(); } - public PayViewModel? ReadElement(PaySearchModel model) + public PaymentViewModel? ReadElement(PaymentSearchModel model) { throw new NotImplementedException(); } - public List? ReadList(PaySearchModel? model) + public List? ReadList(PaymentSearchModel? model) { throw new NotImplementedException(); } diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/CategoryProductBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/CategoryProductBindingModel.cs deleted file mode 100644 index eecc797..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/CategoryProductBindingModel.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.BindingModels -{ - public class CategoryProductBindingModel : ICategoryProductModel - { - public int ID { get; set; } - - public string Name { get; set; } = string.Empty; - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs index b3c825b..da88fb8 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ClientBindingModel.cs @@ -7,8 +7,12 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.BindingModels { public class ClientBindingModel : IClientModel { - public int UserID { get; set; } + public string ClientFIO { get; set; } = string.Empty; public string Email { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + + public int ID { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ExpensesBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/CostItemBindingModel.cs similarity index 59% rename from ElectronicsShop/ElectronicsShopContracts/BindingModels/ExpensesBindingModel.cs rename to ElectronicsShop/ElectronicsShopContracts/BindingModels/CostItemBindingModel.cs index ded9b77..898f7d1 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ExpensesBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/CostItemBindingModel.cs @@ -6,9 +6,13 @@ using System.Text; using System.Threading.Tasks; namespace ElectronicsShopContracts.BindingModels { - public class ExpensesBindingModel : IExpensesModel { + public class CostItemBindingModel : ICostItemModel { + public int ID { get; set; } + public int ClientID { get; set; } - public int Sum { get; set; } - public int OrderCount { get; set; } + + public string Name { get; set; } = string.Empty; + + public double Price { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/EmployeeBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/EmployeeBindingModel.cs new file mode 100644 index 0000000..c406966 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/EmployeeBindingModel.cs @@ -0,0 +1,18 @@ +using ElectronicsShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.BindingModels { + public class EmployeeBindingModel : IEmployeeModel { + public int ID { get; set; } + + public string EmployeeFIO { get; set; } = string.Empty; + + public string Login { get; set; } = string.Empty; + + public string Password { get; set; } = string.Empty; + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ImplementerBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ImplementerBindingModel.cs deleted file mode 100644 index 017418c..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ImplementerBindingModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -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 06ff2bf..197eb9a 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/OrderBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/OrderBindingModel.cs @@ -10,19 +10,16 @@ namespace ElectronicsShopContracts.BindingModels { public class OrderBindingModel : IOrderModel { - public int ID { get; set; } - public int ClientID { get; set; } - public int? ImplementerID { get; set; } - public int PaymentID { get; set; } + public int ID { get; set; } + + public int ClientID { get; set; } + + public int? EmployeeID { get; set; } + + public DateTime DateCreate { get; set; } = DateTime.Now; + 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/PayBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/PaymentBindingModel.cs similarity index 63% rename from ElectronicsShop/ElectronicsShopContracts/BindingModels/PayBindingModel.cs rename to ElectronicsShop/ElectronicsShopContracts/BindingModels/PaymentBindingModel.cs index 25b935f..4868155 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/PayBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/PaymentBindingModel.cs @@ -7,11 +7,16 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.BindingModels { - public class PayBindingModel : IPayModel + public class PaymentBindingModel : IPaymentModel { public int ID { get; set; } + public int ClientID { get; set; } - public double SummaPay { get; set; } - public DateTime DatePay { get; set; } - } + + public int ProductID { get; set; } + + public int OrderID { get; set; } + + public double SumPayment { get; set; } + } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ProductBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ProductBindingModel.cs index 8987b09..b878167 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/ProductBindingModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BindingModels/ProductBindingModel.cs @@ -1,4 +1,5 @@ -using ElectronicsShopDataModels.Models; +using ElectronicsShopDataModels.Enums; +using ElectronicsShopDataModels.Models; using System; using System.Collections.Generic; using System.Linq; @@ -7,16 +8,15 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.BindingModels { - public class ProductBindingModel : IProductModel - { - //ID категории продукта (товара) - public int CategoryID { get; set; } - //ID продукта (товара) - public int ID { get; set; } + public class ProductBindingModel : IProductModel { + public int ID { get; set; } + public int CostItemID { get; set; } - public string ProductName { get; set; } = string.Empty; - - public double Price { get; set; } - } + public string ProductName { get; set; } = string.Empty; + + public double Price { get; set; } + + public PaymeantOption PayOption { get; set; } = PaymeantOption.Неоплачено; + } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/RoleBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/RoleBindingModel.cs deleted file mode 100644 index 3d2a806..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/RoleBindingModel.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.BindingModels -{ - public class RoleBindingModel : IRoleModel - { - public int ID { get; set; } - - public string Name { get; set; } = string.Empty; - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs b/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs deleted file mode 100644 index c174dfe..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BindingModels/UserBindingModel.cs +++ /dev/null @@ -1,19 +0,0 @@ -using ElectronicsShopDataModels; -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.BindingModels -{ - public class UserBindingModel : IUserModel { - public int ID { get; set; } - - 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/ICategoryProductLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/ICategoryProductLogic.cs deleted file mode 100644 index e788e9f..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/ICategoryProductLogic.cs +++ /dev/null @@ -1,20 +0,0 @@ -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 ICategoryProductLogic - { - List? ReadList(CategoryProductSearchModel? model); - - bool Create(CategoryProductBindingModel model); - bool Update(CategoryProductBindingModel model); - bool Delete(CategoryProductBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs index 6b132ac..33b24e7 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IClientLogic.cs @@ -9,10 +9,10 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.BusinessLogicContracts { public interface IClientLogic { - List? ReadList(ClientSearchModel? model); + List? ReadList(ClientSearchModel model); ClientViewModel? ReadElemet(ClientSearchModel model); - bool Add(ClientBindingModel model); + bool Create(ClientBindingModel model); bool Update(ClientBindingModel model); bool Delete(ClientBindingModel model); } diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IImplementerLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/ICostItemLogic.cs similarity index 50% rename from ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IImplementerLogic.cs rename to ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/ICostItemLogic.cs index 6e02a7e..9342006 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IImplementerLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/ICostItemLogic.cs @@ -8,12 +8,12 @@ using System.Text; using System.Threading.Tasks; namespace ElectronicsShopContracts.BusinessLogicContracts { - public interface IImplementerLogic { - List? ReadList(ImplementerSearchModel? model); - ImplementerViewModel? ReadElemet(ImplementerSearchModel model); + public interface ICostItemLogic { + List? ReadList(CostItemSearchModel model); + CostItemViewModel? ReadElement(CostItemSearchModel model); - bool Add(ImplementerBindingModel model); - bool Update(ImplementerBindingModel model); - bool Delete(ImplementerBindingModel model); + bool Create(CostItemBindingModel model); + bool Update(CostItemBindingModel model); + bool Delete(CostItemBindingModel model); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IEmployeeLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IEmployeeLogic.cs new file mode 100644 index 0000000..5d5eba8 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IEmployeeLogic.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 IEmployeeLogic { + List? ReadList(EmployeeSearchModel model); + EmployeeViewModel? ReadElemet(EmployeeSearchModel model); + + bool Add(EmployeeBindingModel model); + bool Update(EmployeeBindingModel model); + bool Delete(EmployeeBindingModel model); + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IExpensesLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IExpensesLogic.cs deleted file mode 100644 index f9feed5..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IExpensesLogic.cs +++ /dev/null @@ -1,14 +0,0 @@ -using ElectronicsShopContracts.BindingModels; -using ElectronicsShopContracts.ViewModels; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.BusinessLogicContracts { - public interface IExpensesLogic { - ExpensesViewModel? ReadElement(ExpensesBindingModel model); - ExpensesViewModel? Create(ExpensesBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs index cc68b08..e1e5cc6 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IOrderLogic.cs @@ -15,8 +15,5 @@ namespace ElectronicsShopContracts.BusinessLogicContracts OrderViewModel? ReadElement(OrderSearchModel model); bool CreateOrder(OrderBindingModel model); - bool TakeOrderInWork(OrderBindingModel model); - bool FinishOrder(OrderBindingModel model); - bool DeliveryOrder(OrderBindingModel model); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IPayLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IPaymentLogic.cs similarity index 60% rename from ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IPayLogic.cs rename to ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IPaymentLogic.cs index 4dd746b..f214a77 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IPayLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IPaymentLogic.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.BusinessLogicContracts { - public interface IPayLogic + public interface IPaymentLogic { - List? ReadList(PaySearchModel? model); - PayViewModel? ReadElement(PaySearchModel model); + List? ReadList(PaymentSearchModel model); + PaymentViewModel? ReadElement(PaymentSearchModel model); - bool CreatePay(PayBindingModel model); + bool CreatePay(PaymentBindingModel model); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs index 1727c0a..706a5d5 100644 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs +++ b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IProductLogic.cs @@ -11,8 +11,8 @@ namespace ElectronicsShopContracts.BusinessLogicContracts { public interface IProductLogic { - List? ReadList(ProductSearchModel? model); - ProductViewModel? ReadElement(ProductSearchModel? model); + List? ReadList(ProductSearchModel model); + ProductViewModel? ReadElement(ProductSearchModel model); bool Create(ProductBindingModel model); bool Update(ProductBindingModel model); diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IRoleLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IRoleLogic.cs deleted file mode 100644 index 6141581..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IRoleLogic.cs +++ /dev/null @@ -1,20 +0,0 @@ -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 IRoleLogic - { - List? ReadList(RoleSearchModel? model); - - bool Create(RoleBindingModel model); - bool Update(RoleBindingModel model); - bool Delete(RoleBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs b/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs deleted file mode 100644 index f1e4143..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/BusinessLogicContracts/IUserLogic.cs +++ /dev/null @@ -1,21 +0,0 @@ -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 IUserLogic - { - List? ReadList(ClientSearchModel? model); - ClientViewModel? ReadElemet(ClientSearchModel model); - - bool Add(UserBindingModel model); - bool Update(UserBindingModel model); - bool Delete(UserBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/CategoryProductSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/CategoryProductSearchModel.cs deleted file mode 100644 index 2eddcd6..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/CategoryProductSearchModel.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.SearchModels -{ - public class CategoryProductSearchModel - { - public int? ID { get; set; } - - public string? Name { get; set; } - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ClientSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/ClientSearchModel.cs index c64d20c..9632f91 100644 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ClientSearchModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/SearchModels/ClientSearchModel.cs @@ -9,6 +9,6 @@ namespace ElectronicsShopContracts.SearchModels public class ClientSearchModel { public int? ID { get; set; } - public string? Login { get; set; } + public string? Email { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ExpensesSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/CostItemSearchModel.cs similarity index 62% rename from ElectronicsShop/ElectronicsShopContracts/SearchModels/ExpensesSearchModel.cs rename to ElectronicsShop/ElectronicsShopContracts/SearchModels/CostItemSearchModel.cs index d829846..8197a35 100644 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ExpensesSearchModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/SearchModels/CostItemSearchModel.cs @@ -5,7 +5,8 @@ using System.Text; using System.Threading.Tasks; namespace ElectronicsShopContracts.SearchModels { - public class ExpensesSearchModel { - public int ClientID { get; set; } + public class CostItemSearchModel { + public int? ID { get; set; } + public string? Name { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ImplementerSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/EmployeeSearchModel.cs similarity index 57% rename from ElectronicsShop/ElectronicsShopContracts/SearchModels/ImplementerSearchModel.cs rename to ElectronicsShop/ElectronicsShopContracts/SearchModels/EmployeeSearchModel.cs index 7e15565..50c1703 100644 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ImplementerSearchModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/SearchModels/EmployeeSearchModel.cs @@ -7,9 +7,10 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.SearchModels { - public class ImplementerSearchModel + public class EmployeeSearchModel { - public int UserID { get; set; } - public Quakifications Quakifications { get; set; } + public int? ID { get; set; } + public string? EmployeFIO { get; set; } + public string? Login { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/OrderSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/OrderSearchModel.cs index bf0d84b..380f995 100644 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/OrderSearchModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/SearchModels/OrderSearchModel.cs @@ -11,12 +11,8 @@ namespace ElectronicsShopContracts.SearchModels public class OrderSearchModel { public int? ID { get; set; } - //public int? OplataID { get; set; } public int? ClientID { get; set; } - public OrderStatus OrderStatus { get; set; } - public PaymeantOption PaymeantOption { get; set; } + public int? EmployeeID { get; set; } public DateTime? DateFrom { get; set; } - public DateTime? DateTo { get; set;} - public Dictionary ProductList { get; set; } = new(); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/PaySearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/PaySearchModel.cs deleted file mode 100644 index 7084788..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/PaySearchModel.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.SearchModels -{ - public class PaySearchModel - { - public int? ID { get; set; } - public int? ClientID { get; set; } - public double? SummaPay { get; set; } - public DateTime DatePay { get; set; } - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/RoleSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/PaymentSearchModel.cs similarity index 57% rename from ElectronicsShop/ElectronicsShopContracts/SearchModels/RoleSearchModel.cs rename to ElectronicsShop/ElectronicsShopContracts/SearchModels/PaymentSearchModel.cs index 4efaa8b..f332ddd 100644 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/RoleSearchModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/SearchModels/PaymentSearchModel.cs @@ -6,10 +6,11 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.SearchModels { - public class RoleSearchModel + public class PaymentSearchModel { public int? ID { get; set; } - - public string? Name { get; set; } = string.Empty; + public int? ProductID { get; set; } + public int? OrderID { get; set; } + public double? SumPay { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ProductSearchModel.cs b/ElectronicsShop/ElectronicsShopContracts/SearchModels/ProductSearchModel.cs index 7b21e54..43a0e67 100644 --- a/ElectronicsShop/ElectronicsShopContracts/SearchModels/ProductSearchModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/SearchModels/ProductSearchModel.cs @@ -1,4 +1,5 @@ -using System; +using ElectronicsShopDataModels.Enums; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -10,5 +11,7 @@ namespace ElectronicsShopContracts.SearchModels { public int? ID { get; set; } public string? ProductName { get; set; } + public string? CostItem { get; set; } + public PaymeantOption? PayOption { get; set; } } } diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/ICategoryProductStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/ICategoryProductStorage.cs deleted file mode 100644 index b8e3c1b..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/ICategoryProductStorage.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.StorageContracts -{ - public interface ICategoryProductStorage - { - List GetFullList(); - List GetFilteredList(CategoryProductSearchModel model); - CategoryProductViewModel? GetElement(CategoryProductSearchModel model); - CategoryProductViewModel? Insert(CategoryProductBindingModel model); - CategoryProductViewModel? Update(CategoryProductBindingModel model); - CategoryProductViewModel? Delete(CategoryProductBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IClientStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IClientStorage.cs index e890ea4..4d1f08c 100644 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IClientStorage.cs +++ b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IClientStorage.cs @@ -13,6 +13,7 @@ namespace ElectronicsShopContracts.StorageContracts { List GetFullList(); List GetFilteredList(ClientSearchModel model); + ClientViewModel? GetElement(ClientSearchModel model); ClientViewModel? Insert(ClientBindingModel model); ClientViewModel? Update(ClientBindingModel model); diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/ICostItemModel.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/ICostItemModel.cs new file mode 100644 index 0000000..50c9fcc --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/ICostItemModel.cs @@ -0,0 +1,20 @@ +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.StorageContracts { + public interface ICostItemModel { + List GetFullList(); + List GetFillteredList(CostItemSearchModel model); + + CostItemViewModel GetElement(CostItemSearchModel model); + CostItemViewModel? Insert(CostItemBindingModel model); + CostItemViewModel? Update(CostItemBindingModel model); + CostItemViewModel? Delete(CostItemBindingModel model); + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IEmployeeStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IEmployeeStorage.cs new file mode 100644 index 0000000..323d5e0 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IEmployeeStorage.cs @@ -0,0 +1,22 @@ +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.StorageContracts +{ + public interface IEmployeeStorage + { + List GetFullList(); + List GetFilteredList(EmployeeSearchModel model); + + EmployeeViewModel? GetElement(ClientSearchModel model); + EmployeeViewModel? Insert(EmployeeBindingModel model); + EmployeeViewModel? Update(EmployeeBindingModel model); + EmployeeViewModel? Delete(EmployeeBindingModel model); + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IExpensesStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IExpensesStorage.cs deleted file mode 100644 index 67ef78f..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IExpensesStorage.cs +++ /dev/null @@ -1,16 +0,0 @@ -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.StorageContracts { - public interface IExpensesStorage { - ExpensesViewModel? GetElement(ExpensesSearchModel model); - - ExpensesViewModel Create(ExpensesBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IImplementerStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IImplementerStorage.cs deleted file mode 100644 index a2c40f1..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IImplementerStorage.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.StorageContracts -{ - public interface IImplementerStorage - { - List GetFullList(); - List GetFilteredList(ImplementerSearchModel model); - ImplementerViewModel? GetElement(ClientSearchModel model); - ImplementerViewModel? Insert(ImplementerBindingModel model); - ImplementerViewModel? Update(ImplementerBindingModel model); - ImplementerViewModel? Delete(ImplementerBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IOrderStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IOrderStorage.cs index e4223fa..6a5bff3 100644 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IOrderStorage.cs +++ b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IOrderStorage.cs @@ -13,9 +13,9 @@ namespace ElectronicsShopContracts.StorageContracts { List GetFullList(); List GetFilteredList(OrderSearchModel model); + OrderViewModel? GetElement(OrderSearchModel model); OrderViewModel? Insert(OrderBindingModel model); OrderViewModel? Update(OrderBindingModel model); - OrderViewModel? Delete(OrderBindingModel model); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IPayStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IPaymentStorage.cs similarity index 60% rename from ElectronicsShop/ElectronicsShopContracts/StorageContracts/IPayStorage.cs rename to ElectronicsShop/ElectronicsShopContracts/StorageContracts/IPaymentStorage.cs index e4be54b..9f630c4 100644 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IPayStorage.cs +++ b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IPaymentStorage.cs @@ -9,10 +9,10 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.StorageContracts { - public interface IPayStorage + public interface IPaymentStorage { - List GetFullList(); - PayViewModel? GetElement(PaySearchModel model); - PayViewModel? Insert(PayBindingModel model); + List GetFullList(); + PaymentViewModel? GetElement(PaymentSearchModel model); + PaymentViewModel? Insert(PaymentBindingModel model); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IRoleStorage.cs b/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IRoleStorage.cs deleted file mode 100644 index 7785eb4..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/StorageContracts/IRoleStorage.cs +++ /dev/null @@ -1,21 +0,0 @@ -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.StorageContracts -{ - public interface IRoleStorage - { - List GetFullList(); - List GetFilteredList(RoleSearchModel model); - RoleViewModel? GetElement(RoleSearchModel model); - RoleViewModel? Insert(RoleBindingModel model); - RoleViewModel? Update(RoleBindingModel model); - RoleViewModel? Delete(RoleBindingModel model); - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/CategoryProductViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/CategoryProductViewModel.cs deleted file mode 100644 index 35cc4af..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/CategoryProductViewModel.cs +++ /dev/null @@ -1,18 +0,0 @@ -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.ViewModels -{ - public class CategoryProductViewModel : ICategoryProductModel - { - public int ID { get; set; } - - [DisplayName("Название категории продукта")] - public string Name { get; set; } = string.Empty; - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ClientViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/ClientViewModel.cs index 9aae3f4..c8eee62 100644 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ClientViewModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/ViewModels/ClientViewModel.cs @@ -9,12 +9,16 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.ViewModels { - public class ClientViewModel : IClientModel - { - //ID пользователя - public int UserID { get; set; } + public class ClientViewModel : IClientModel { + public int ID { get; set; } - [DisplayName("Почта")] - public string Email { get; set; } = string.Empty; - } + [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/ElectronicsShop/ElectronicsShopContracts/ViewModels/CostItemViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/CostItemViewModel.cs new file mode 100644 index 0000000..20f6f4a --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/ViewModels/CostItemViewModel.cs @@ -0,0 +1,22 @@ + +using ElectronicsShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.ViewModels { + public class CostItemViewModel : ICostItemModel { + public int ID { get; set; } + + public int ClientID { get; set; } + + [DisplayName("Название статьи затрат")] + public string Name { get; set; } = string.Empty; + + [DisplayName("Затраты")] + public double Price { get; set; } + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/EmployeeViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/EmployeeViewModel.cs new file mode 100644 index 0000000..7f32356 --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/ViewModels/EmployeeViewModel.cs @@ -0,0 +1,24 @@ +using ElectronicsShopDataModels.Enums; +using ElectronicsShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.ViewModels +{ + public class EmployeeViewModel : IEmployeeModel { + public int ID { get; set; } + + [DisplayName("ФИО сотрудника")] + public string EmployeeFIO { get; set; } = string.Empty; + + [DisplayName("Логина сотрудника")] + public string Login { get; set; } = string.Empty; + + [DisplayName("Пароль сотрудника")] + public string Password { get; set; } = string.Empty; + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ExpensesViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/ExpensesViewModel.cs deleted file mode 100644 index c84c31f..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ExpensesViewModel.cs +++ /dev/null @@ -1,21 +0,0 @@ -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.ViewModels { - public class ExpensesViewModel : IExpensesModel { - - [DisplayName("Клиента ID")] - public int ClientID { get; set; } - - [DisplayName("Сумма всех заказов")] - public int Sum { get; set; } - - [DisplayName("Заказов всего")] - public int OrderCount { get; set; } - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ImplementerViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/ImplementerViewModel.cs deleted file mode 100644 index 0e05ef4..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ImplementerViewModel.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ElectronicsShopDataModels.Enums; -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.ViewModels -{ - public class ImplementerViewModel : IImplementerModel - { - public int UserID {get; set;} - - public Quakifications Qualification { get; set; } = Quakifications.Отсутствует; - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/OrderViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/OrderViewModel.cs index da40d8d..e42e81b 100644 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/OrderViewModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/ViewModels/OrderViewModel.cs @@ -11,29 +11,19 @@ namespace ElectronicsShopContracts.ViewModels { public class OrderViewModel : IOrderModel { - public int ID { get; set; } - [DisplayName("Клиент ID")] - public int ClientID { get; set; } - [DisplayName("Исполнитель ID")] - public int? ImplementerID { get; set; } - [DisplayName("Оплата ID")] - public int PaymentID { get; set; } + public int ID { get; set; } - [DisplayName("Сумма")] - public double Sum { get; set; } + public int ClientID { get; set; } - [DisplayName("Статус")] - public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; + public int? EmployeeID { get; set; } - [DisplayName("Стутус оплаты")] - public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно; + [DisplayName("Дата заказа")] + public DateTime DateCreate { get; set; } = DateTime.Now; - [DisplayName("Дата создания")] - public DateTime DateCreate { get; set; } = DateTime.Now; + [DisplayName("Сумма заказа")] + public double Sum { get; set; } - [DisplayName("Дата выполнения")] - public DateTime? DateImplement { get; set; } - [DisplayName("Корзина")] + [DisplayName("Список продуктов")] public Dictionary ProductList { get; set; } = new(); } } diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/PayViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/PayViewModel.cs deleted file mode 100644 index 2d70501..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/PayViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.ViewModels -{ - public class PayViewModel : IPayModel - { - public int ID { get; set; } - public int ClientID {get;set;} - - public double SummaPay { get; set; } - - public DateTime DatePay { get; set; } - - } -} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/PaymentViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/PaymentViewModel.cs new file mode 100644 index 0000000..a57c66e --- /dev/null +++ b/ElectronicsShop/ElectronicsShopContracts/ViewModels/PaymentViewModel.cs @@ -0,0 +1,21 @@ +using ElectronicsShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ElectronicsShopContracts.ViewModels +{ + public class PaymentViewModel : IPaymentModel { + public int ID { get; set; } + + public int ProductID { get; set; } + + public int OrderID { get; set; } + + [DisplayName("Cумма оплаты продукта")] + public double SumPayment { get; set; } + } +} diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ProductViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/ProductViewModel.cs index 600d70d..4804ee8 100644 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/ProductViewModel.cs +++ b/ElectronicsShop/ElectronicsShopContracts/ViewModels/ProductViewModel.cs @@ -1,4 +1,5 @@ -using ElectronicsShopDataModels.Models; +using ElectronicsShopDataModels.Enums; +using ElectronicsShopDataModels.Models; using System; using System.Collections.Generic; using System.ComponentModel; @@ -8,17 +9,18 @@ using System.Threading.Tasks; namespace ElectronicsShopContracts.ViewModels { - public class ProductViewModel : IProductModel - { - //ID категории продукта (товара) - public int CategoryID { get; set; } - //ID продукта (товара) - public int ID { get; set; } + public class ProductViewModel : IProductModel { + public int ID { get; set; } - [DisplayName("Название товара")] - public string ProductName { get; set; } = string.Empty; + public int CostItemID { get; set; } - [DisplayName("Цена")] - public double Price { get; set; } - } + [DisplayName("Название продукта")] + public string ProductName { get; set; } = string.Empty; + + [DisplayName("Стоимость продукта")] + public double Price { get; set; } + + [DisplayName("Статус оплаты")] + public PaymeantOption PayOption { get; set; } = PaymeantOption.Неоплачено; + } } diff --git a/ElectronicsShop/ElectronicsShopContracts/ViewModels/RoleViewModel.cs b/ElectronicsShop/ElectronicsShopContracts/ViewModels/RoleViewModel.cs deleted file mode 100644 index 77dadcf..0000000 --- a/ElectronicsShop/ElectronicsShopContracts/ViewModels/RoleViewModel.cs +++ /dev/null @@ -1,21 +0,0 @@ -using ElectronicsShopDataModels; -using ElectronicsShopDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopContracts.ViewModels -{ - public class RoleViewModel : IRoleModel - { - public int ID { get; set; } - - [DisplayName("Название роли")] - public string Name { get; set; } = string.Empty; - - - } -} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Enums/OrderStatus.cs b/ElectronicsShop/ElectronicsShopDataModels/Enums/OrderStatus.cs deleted file mode 100644 index 1e55541..0000000 --- a/ElectronicsShop/ElectronicsShopDataModels/Enums/OrderStatus.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopDataModels.Enums -{ - public enum OrderStatus - { - Неизвестен = -1, - - Принят = 0, - - Выполняется = 1, - - Готов = 2, - - Выдан = 3 - } -} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Enums/PaymeantOption.cs b/ElectronicsShop/ElectronicsShopDataModels/Enums/PaymeantOption.cs index c77412b..3f0e525 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Enums/PaymeantOption.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Enums/PaymeantOption.cs @@ -8,7 +8,7 @@ namespace ElectronicsShopDataModels.Enums { public enum PaymeantOption { - Неизвестно = -1, + Неоплачено = -1, Полная_оплата = 0, diff --git a/ElectronicsShop/ElectronicsShopDataModels/Enums/Quakifications.cs b/ElectronicsShop/ElectronicsShopDataModels/Enums/Quakifications.cs deleted file mode 100644 index 7177a81..0000000 --- a/ElectronicsShop/ElectronicsShopDataModels/Enums/Quakifications.cs +++ /dev/null @@ -1,11 +0,0 @@ -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/ICategoryProductModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/ICategoryProductModel.cs deleted file mode 100644 index 2c30484..0000000 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/ICategoryProductModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopDataModels.Models -{ - public interface ICategoryProductModel : IID - { - string Name { get; } - } -} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs index 588c411..9301176 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IClientModel.cs @@ -5,8 +5,9 @@ using System.Text; using System.Threading.Tasks; namespace ElectronicsShopDataModels.Models { - public interface IClientModel { - int UserID { get; } + public interface IClientModel : IID { + string ClientFIO { get; } string Email { get; } + string Password { get; } } } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IExpensesModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/ICostItemModel.cs similarity index 69% rename from ElectronicsShop/ElectronicsShopDataModels/Models/IExpensesModel.cs rename to ElectronicsShop/ElectronicsShopDataModels/Models/ICostItemModel.cs index 97f1077..a1ca2c7 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IExpensesModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/ICostItemModel.cs @@ -5,9 +5,9 @@ using System.Text; using System.Threading.Tasks; namespace ElectronicsShopDataModels.Models { - public interface IExpensesModel { + public interface ICostItemModel : IID{ int ClientID { get; } - int Sum { get; } - int OrderCount { get; } + string Name { get; } + double Price { get; } } } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IImplementerModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IEmployeeModel.cs similarity index 63% rename from ElectronicsShop/ElectronicsShopDataModels/Models/IImplementerModel.cs rename to ElectronicsShop/ElectronicsShopDataModels/Models/IEmployeeModel.cs index 0a77ae6..453efb7 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IImplementerModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IEmployeeModel.cs @@ -6,8 +6,9 @@ using System.Text; using System.Threading.Tasks; namespace ElectronicsShopDataModels.Models { - public interface IImplementerModel { - int UserID { get; } - Quakifications Qualification { get; } + public interface IEmployeeModel : IID { + string EmployeeFIO { get; } + string Login { get; } + string Password { get; } } } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs index a1b5068..dee68ac 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IOrderModel.cs @@ -10,13 +10,10 @@ namespace ElectronicsShopDataModels.Models public interface IOrderModel : IID { int ClientID { get; } - int? ImplementerID { get; } - int PaymentID { get; } - OrderStatus Status { get; } - PaymeantOption PaymeantOption { get; } + int? EmployeeID { get; } DateTime DateCreate { get; } - DateTime? DateImplement { get; } double Sum { get; } + //список товаров в заказе Dictionary ProductList { get; } } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IPayModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IPaymentModel.cs similarity index 60% rename from ElectronicsShop/ElectronicsShopDataModels/Models/IPayModel.cs rename to ElectronicsShop/ElectronicsShopDataModels/Models/IPaymentModel.cs index 10f71cd..b10d91e 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IPayModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IPaymentModel.cs @@ -7,10 +7,11 @@ using System.Threading.Tasks; namespace ElectronicsShopDataModels.Models { - public interface IPayModel: IID + public interface IPaymentModel: IID { - int ClientID { get; } - double SummaPay { get; } - DateTime DatePay { get; } + int ProductID { get; } + int OrderID { get; } + double SumPayment { get; } + } } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IProductModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IProductModel.cs index 49a4ae1..c441eb8 100644 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IProductModel.cs +++ b/ElectronicsShop/ElectronicsShopDataModels/Models/IProductModel.cs @@ -1,4 +1,5 @@ -using System; +using ElectronicsShopDataModels.Enums; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -10,6 +11,7 @@ namespace ElectronicsShopDataModels.Models { string ProductName { get; } double Price { get; } - int CategoryID { get; } + int CostItemID { get; } + PaymeantOption PayOption { get; } } } diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IRoleModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IRoleModel.cs deleted file mode 100644 index f8b1c2f..0000000 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IRoleModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopDataModels.Models -{ - public interface IRoleModel : IID - { - string Name { get; } - } -} diff --git a/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs b/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs deleted file mode 100644 index 11e541e..0000000 --- a/ElectronicsShop/ElectronicsShopDataModels/Models/IUserModel.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ElectronicsShopDataModels -{ - public interface IUserModel : IID - { - int RoleID { get; } - - string UserFIO { get; } - string Password { get; } - string Login { get; } - } -}