diff --git a/BeautySalonView/BeautySalonContracts/BindingModels/ClientBindingModel.cs b/BeautySalonView/BeautySalonContracts/BindingModels/ClientBindingModel.cs new file mode 100644 index 0000000..b1c3830 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BindingModels/ClientBindingModel.cs @@ -0,0 +1,17 @@ +using BeautySalonDataModels.Models; + +namespace BeautySalonContracts.BindingModels +{ + public class ClientBindingModel : IClientModel + { + public int Id { get; set; } + + public string ClientLogin { get; set; } = string.Empty; + + public string ClientFIO { get; set; } = string.Empty; + + public string ClientEmail { get; set; } = string.Empty; + + public string ClientPassword { get; set; } = string.Empty; + } +} diff --git a/BeautySalonView/BeautySalonContracts/BindingModels/EvaluationBindingModel.cs b/BeautySalonView/BeautySalonContracts/BindingModels/EvaluationBindingModel.cs new file mode 100644 index 0000000..9928c28 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BindingModels/EvaluationBindingModel.cs @@ -0,0 +1,14 @@ +using BeautySalonDataModels.Models; + +namespace BeautySalonContracts.BindingModels +{ + public class EvaluationBindingModel : IEvaluationModel + { + public int Id { get; set; } + public double PointsProcedure { get; set; } + public double PointsCosmetics { get; set; } + public int ProcedureId { get; set; } + public int ClientId { get; set; } + + } +} \ No newline at end of file diff --git a/BeautySalonView/BeautySalonContracts/BindingModels/OrderBindingModel.cs b/BeautySalonView/BeautySalonContracts/BindingModels/OrderBindingModel.cs new file mode 100644 index 0000000..fd627da --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BindingModels/OrderBindingModel.cs @@ -0,0 +1,18 @@ +using BeautySalonContracts.ViewModels; +using BeautySalonDataModels.Models; +using System; +using System.Collections.Generic; + +namespace BeautySalonContracts.BindingModels +{ + public class OrderBindingModel : IOrderModel + { + public int Id { get; set; } + public DateTime OrderDate { get; set; } + public double OrderAmount { get; set; } + public int ClientId { get; set; } + public List OrderServices { get; set; } = new(); + public List OrderCosmetics { get; set; } = new(); + public List OrderProcedures { get; set; } = new(); + } +} diff --git a/BeautySalonView/BeautySalonContracts/BindingModels/ProcedureBindingModel.cs b/BeautySalonView/BeautySalonContracts/BindingModels/ProcedureBindingModel.cs new file mode 100644 index 0000000..7d1994e --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BindingModels/ProcedureBindingModel.cs @@ -0,0 +1,16 @@ +using BeautySalonContracts.ViewModels; +using BeautySalonDataModels.Models; +using System.Collections.Generic; + +namespace BeautySalonContracts.BindingModels +{ + public class ProcedureBindingModel : IProcedureModel + { + public int Id { get; set; } + public string ProcedureName { get; set; } = string.Empty; + public double ProcedurePrice { get; set; } + public double ProcedureDuration { get; set; } + public int ClientId { get; set; } + public List ProcedureCosmetics { get; set; } = new(); + } +} diff --git a/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IClientLogic.cs b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IClientLogic.cs new file mode 100644 index 0000000..5c4b32e --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IClientLogic.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using BeautySalonContracts.BindingModels; +using BeautySalonContracts.ViewModels; +using BeautySalonContracts.SearchModels; + +namespace BeautySalonContracts.BusinessLogicContracts +{ + 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/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IEvaluationLogic.cs b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IEvaluationLogic.cs new file mode 100644 index 0000000..54949d2 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IEvaluationLogic.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using BeautySalonContracts.BindingModels; +using BeautySalonContracts.ViewModels; +using BeautySalonContracts.SearchModels; + +namespace BeautySalonContracts.BusinessLogicContracts +{ + public interface IEvaluationLogic + { + List? ReadList(EvaluationSearchModel? model); + EvaluationViewModel? ReadElement(EvaluationSearchModel model); + bool Create(EvaluationBindingModel model); + bool Update(EvaluationBindingModel model); + bool Delete(EvaluationBindingModel model); + int GetNumberOfPages(int userId, int pageSize = 10); + } +} diff --git a/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IOrderLogic.cs b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IOrderLogic.cs new file mode 100644 index 0000000..06fc8f3 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IOrderLogic.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using BeautySalonContracts.BindingModels; +using BeautySalonContracts.ViewModels; +using BeautySalonContracts.SearchModels; + +namespace BeautySalonContracts.BusinessLogicContracts +{ + public interface IOrderLogic + { + List? ReadList(OrderSearchModel? model); + OrderViewModel? ReadElement(OrderSearchModel model); + bool Create(OrderBindingModel model); + bool Delete(OrderBindingModel model); + bool Update(OrderBindingModel model); + int GetNumberOfPages(int userId, int pageSize = 10); + } +} diff --git a/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IProcedureLogic.cs b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IProcedureLogic.cs new file mode 100644 index 0000000..f95ab6b --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/BusinessLogicContracts/IProcedureLogic.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using BeautySalonContracts.BindingModels; +using BeautySalonContracts.ViewModels; +using BeautySalonContracts.SearchModels; + +namespace BeautySalonContracts.BusinessLogicContracts +{ + public interface IProcedureLogic + { + List? ReadList(ProcedureSearchModel? model); + ProcedureViewModel? ReadElement(ProcedureSearchModel model); + bool Create(ProcedureBindingModel model); + bool Update(ProcedureBindingModel model); + bool Delete(ProcedureBindingModel model); + int GetNumberOfPages(int userId, int pageSize = 10); + } +} diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/ClientViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/ClientViewModel.cs new file mode 100644 index 0000000..f2257e8 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/ClientViewModel.cs @@ -0,0 +1,27 @@ +using BeautySalonDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeautySalonContracts.ViewModels +{ + public class ClientViewModel : IClientModel + { + public int Id { get; set; } + + [DisplayName("Логин клиента")] + public string ClientLogin { get; set; } = string.Empty; + + [DisplayName("ФИО клиента")] + public string ClientFIO { get; set; } = string.Empty; + + [DisplayName("Почта клиента")] + public string ClientEmail { get; set; } = string.Empty; + + [DisplayName("Пароль клиента")] + public string ClientPassword { get; set; } = string.Empty; + } +} diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/EvaluationViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/EvaluationViewModel.cs new file mode 100644 index 0000000..a831c03 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/EvaluationViewModel.cs @@ -0,0 +1,24 @@ +using BeautySalonDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeautySalonContracts.ViewModels +{ + public class EvaluationViewModel : IEvaluationModel + { + [DisplayName("Баллы за процедуру")] + public double PointsProcedure { get; set; } + + [DisplayName("Баллы за косметику")] + public double PointsCosmetics { get; set; } + public int ClientId { get; set; } + public int Id { get; set; } + + public int ProcedureId { get; set; } + public string ProcedureName { get; set; } = string.Empty; + } +} diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/OrderCosmeticViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/OrderCosmeticViewModel.cs new file mode 100644 index 0000000..18ca225 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/OrderCosmeticViewModel.cs @@ -0,0 +1,16 @@ +namespace BeautySalonContracts.ViewModels +{ + public class OrderCosmeticViewModel + { + public CosmeticViewModel Cosmetic { get; set; } = null!; + public int Count { get; set; } + + public OrderCosmeticViewModel() { } + + public OrderCosmeticViewModel(CosmeticViewModel cosmetic, int count) + { + Cosmetic = cosmetic; + Count = count; + } + } +} \ No newline at end of file diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/OrderProcedureViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/OrderProcedureViewModel.cs new file mode 100644 index 0000000..d8e8b9b --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/OrderProcedureViewModel.cs @@ -0,0 +1,16 @@ +namespace BeautySalonContracts.ViewModels +{ + public class OrderProcedureViewModel + { + public ProcedureViewModel Procedure { get; set; } = null!; + public int Count { get; set; } + + public OrderProcedureViewModel() { } + + public OrderProcedureViewModel(ProcedureViewModel procedure, int count) + { + Procedure = procedure; + Count = count; + } + } +} diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/OrderViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/OrderViewModel.cs new file mode 100644 index 0000000..244a2f8 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/OrderViewModel.cs @@ -0,0 +1,23 @@ +using BeautySalonDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeautySalonContracts.ViewModels +{ + public class OrderViewModel : IOrderModel + { + [DisplayName("Дата заказа")] + public DateTime OrderDate { get; set; } + + [DisplayName("Сумма")] + public double OrderAmount { get; set; } + public int ClientId { get; set; } + public int Id { get; set; } + public List OrderServices { get; set; } = new(); + public List OrderProcedures { get; set; } = new(); + } +} diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/ProcedureEvaluationViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/ProcedureEvaluationViewModel.cs new file mode 100644 index 0000000..6d57cc8 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/ProcedureEvaluationViewModel.cs @@ -0,0 +1,16 @@ +namespace BeautySalonContracts.ViewModels +{ + public class ProcedureEvaluationViewModel + { + public CosmeticViewModel Cosmetic { get; set; } = null!; + public int Count { get; set; } + + public ProcedureEvaluationViewModel() { } + + public ProcedureEvaluationViewModel(CosmeticViewModel car, int count) + { + Cosmetic = car; + Count = count; + } + } +} diff --git a/BeautySalonView/BeautySalonContracts/ViewModels/ProcedureViewModel.cs b/BeautySalonView/BeautySalonContracts/ViewModels/ProcedureViewModel.cs new file mode 100644 index 0000000..646c7f5 --- /dev/null +++ b/BeautySalonView/BeautySalonContracts/ViewModels/ProcedureViewModel.cs @@ -0,0 +1,26 @@ +using BeautySalonDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeautySalonContracts.ViewModels +{ + public class ProcedureViewModel : IProcedureModel + { + [DisplayName("Наименование процедуры")] + public string ProcedureName { get; set; } = string.Empty; + + [DisplayName("Цена процедуры")] + public double ProcedurePrice { get; set; } + + public int ClientId { get; set; } + + public int Id { get; set; } + public List ProcedureCosmetics { get; set; } = new(); + public List ProcedureRatings { get; set; } = new(); + + } +}