From a7bfe8177a110e1cf2b9535b9194c53d57d779e3 Mon Sep 17 00:00:00 2001 From: Adelina888 Date: Thu, 20 Feb 2025 18:28:44 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OrderBusinessLogicContract.cs | 42 ++++++++++++++++ .../PostBusinessLogicContract.cs | 47 ++++++++++++++++++ .../ProductBusinessLogicContract.cs | 44 +++++++++++++++++ .../RestaurantBusinessLogicContract.cs | 37 ++++++++++++++ .../SalaryBusinessLogicContract.cs | 26 ++++++++++ .../WorkerBusinessLogicContract.cs | 48 +++++++++++++++++++ .../PipingHotBusinessLogic.csproj | 10 ++++ 7 files changed, 254 insertions(+) create mode 100644 PipingHot/PipingHotBusinessLogic/Implementations/OrderBusinessLogicContract.cs create mode 100644 PipingHot/PipingHotBusinessLogic/Implementations/PostBusinessLogicContract.cs create mode 100644 PipingHot/PipingHotBusinessLogic/Implementations/ProductBusinessLogicContract.cs create mode 100644 PipingHot/PipingHotBusinessLogic/Implementations/RestaurantBusinessLogicContract.cs create mode 100644 PipingHot/PipingHotBusinessLogic/Implementations/SalaryBusinessLogicContract.cs create mode 100644 PipingHot/PipingHotBusinessLogic/Implementations/WorkerBusinessLogicContract.cs create mode 100644 PipingHot/PipingHotBusinessLogic/PipingHotBusinessLogic.csproj diff --git a/PipingHot/PipingHotBusinessLogic/Implementations/OrderBusinessLogicContract.cs b/PipingHot/PipingHotBusinessLogic/Implementations/OrderBusinessLogicContract.cs new file mode 100644 index 0000000..b21d83e --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/Implementations/OrderBusinessLogicContract.cs @@ -0,0 +1,42 @@ +using PipingHotContrast.BusinessLogicsContracts; +using PipingHotContrast.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PipingHotBusinessLogic.Implementations; + +internal class OrderBusinessLogicContract : IOrderBusinessLogicContract +{ + public List GetAllOrdersByPeriod(DateTime fromDate, DateTime toDate) + { + return []; + } + public List GetAllOrdersByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate) + { + return []; + } + public List GetAllOrdersByRestaurantByPeriod(string restaurantId, DateTime fromDate, DateTime toDate) + { + return []; + } + public List GetAllOrdersByProductByPeriod(string productId, DateTime fromDate, DateTime toDate) + { + return []; + } + public OrderDataModel GetOrderByData(string data) + { + return new("", "", "", 0, true, []); + } + + public void InsertOrder(OrderDataModel orderDataModel) + { + + } + public void CancelOrder(string id) + { + + } +} diff --git a/PipingHot/PipingHotBusinessLogic/Implementations/PostBusinessLogicContract.cs b/PipingHot/PipingHotBusinessLogic/Implementations/PostBusinessLogicContract.cs new file mode 100644 index 0000000..1a1cf58 --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/Implementations/PostBusinessLogicContract.cs @@ -0,0 +1,47 @@ +using PipingHotContrast.BusinessLogicsContracts; +using PipingHotContrast.DataModels; +using PipingHotContrast.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PipingHotBusinessLogic.Implementations; + +internal class PostBusinessLogicContract : IPostBusinessLogicContract +{ + public List GetAllPosts(bool onlyActive) + { + return []; + } + + public List GetAllDataOfPost(string postId) + { + return []; + } + public PostDataModel GetPostByData(string data) + { + return new("", "","", PostType.None, 0, true, DateTime.UtcNow); + } + + public void InsertPost(PostDataModel postDataModel) + { + + } + public void UpdatePost(PostDataModel postDataModel) + { + + } + public void DeletePost(string id) + { + + } + + public void RestorePost(string id) + { + + } + + +} diff --git a/PipingHot/PipingHotBusinessLogic/Implementations/ProductBusinessLogicContract.cs b/PipingHot/PipingHotBusinessLogic/Implementations/ProductBusinessLogicContract.cs new file mode 100644 index 0000000..5bc0d5a --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/Implementations/ProductBusinessLogicContract.cs @@ -0,0 +1,44 @@ +using PipingHotContrast.BusinessLogicsContracts; +using PipingHotContrast.DataModels; +using PipingHotContrast.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PipingHotBusinessLogic.Implementations; + +internal class ProductBusinessLogicContract : IProductBusinessLogicContract +{ + public List GetAllProducts(bool onlyActive = true) + { + return []; + } + + public List GetAllProductsByRestaurant(string restaurantId, bool onlyActive = true) + { + return []; + } + public List GetProductHistoryByProduct(string productId) + { + return []; + } + public ProductDataModel GetProductByData(string data) + { + return new("", "", ProductType.None, "", 0, true); + } + public void InsertProduct(ProductDataModel productDataModel) + { + + } + + public void UpdateProduct(ProductDataModel productDataModel) + { + + } + public void DeleteProduct(string id) + { + + } +} diff --git a/PipingHot/PipingHotBusinessLogic/Implementations/RestaurantBusinessLogicContract.cs b/PipingHot/PipingHotBusinessLogic/Implementations/RestaurantBusinessLogicContract.cs new file mode 100644 index 0000000..71313ef --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/Implementations/RestaurantBusinessLogicContract.cs @@ -0,0 +1,37 @@ + +using PipingHotContrast.BusinessLogicsContracts; +using PipingHotContrast.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PipingHotBusinessLogic.Implementations; + +internal class RestaurantBusinessLogicContract : IRestaurantBusinessLogicContract +{ + public List GetAllRestaurants() + { + return []; + } + + public RestaurantDataModel GetRestaurantByData(string data) + { + return new("", "", null, null); + } + + public void InsertRestaurant(RestaurantDataModel restaurantDataModel) + { + + } + + public void UpdateRestaurant(RestaurantDataModel restaurantDataModel) + { + + } + public void DeleteRestaurant(string id) + { + + } +} diff --git a/PipingHot/PipingHotBusinessLogic/Implementations/SalaryBusinessLogicContract.cs b/PipingHot/PipingHotBusinessLogic/Implementations/SalaryBusinessLogicContract.cs new file mode 100644 index 0000000..bdd6b01 --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/Implementations/SalaryBusinessLogicContract.cs @@ -0,0 +1,26 @@ +using PipingHotContrast.BusinessLogicsContracts; +using PipingHotContrast.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PipingHotBusinessLogic.Implementations; + +internal class SalaryBusinessLogicContract : ISalaryBusinessLogicContract +{ + public List GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllSalariesByPeriodByWorker(DateTime fromDate, DateTime toDate, string workerId) + { + return []; + } + public void CalculateSalaryByMounth(DateTime date) + { + + } +} diff --git a/PipingHot/PipingHotBusinessLogic/Implementations/WorkerBusinessLogicContract.cs b/PipingHot/PipingHotBusinessLogic/Implementations/WorkerBusinessLogicContract.cs new file mode 100644 index 0000000..3aab982 --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/Implementations/WorkerBusinessLogicContract.cs @@ -0,0 +1,48 @@ +using PipingHotContrast.BusinessLogicsContracts; +using PipingHotContrast.DataModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PipingHotBusinessLogic.Implementations; + +internal class WorkerBusinessLogicContract : IWorkerBusinessLogicContract +{ + public List GetAllWorkers(bool onlyActive = true) + { + return []; + } + public List GetAllWorkersByPost(string postId, bool onlyActive = true) + { + return []; + } + public List GetAllWorkersByBirthDate(DateTime fromDate, DateTime toDate, bool onlyActive = true) + { + return []; + } + + public List GetAllWorkersByEmploymentDate(DateTime fromDate, DateTime toDate, bool onlyActive = true) + { + return []; + } + public WorkerDataModel GetWorkerByData(string data) + { + return new("", "", "","", DateTime.Now, DateTime.Now, true); + } + + public void InsertWorker(WorkerDataModel workerDataModel) + { + + } + + public void UpdateWorker(WorkerDataModel workerDataModel) + { + + } + public void DeleteWorker(string id) + { + + } +} diff --git a/PipingHot/PipingHotBusinessLogic/PipingHotBusinessLogic.csproj b/PipingHot/PipingHotBusinessLogic/PipingHotBusinessLogic.csproj new file mode 100644 index 0000000..ac07c5b --- /dev/null +++ b/PipingHot/PipingHotBusinessLogic/PipingHotBusinessLogic.csproj @@ -0,0 +1,10 @@ + + + + net9.0-windows + enable + true + enable + + +