From d683764ca58c44bb7d4a4120904273a8bb604c81 Mon Sep 17 00:00:00 2001 From: rakhaliullov Date: Fri, 21 Feb 2025 19:35:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=97=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=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectBusinessLogicContract.cs | 31 +++++++++++++ .../FurnitureBusinessLogicContract.cs | 35 +++++++++++++++ .../PostBusinessLogicContract.cs | 40 +++++++++++++++++ .../SalaryBusinessLogicContract.cs | 21 +++++++++ .../WorkPieceBusinessLogicContract.cs | 30 +++++++++++++ .../WorkerBusinessLogicContract.cs | 43 +++++++++++++++++++ .../SoftBedBusinessLogic.csproj | 13 ++++++ .../IWorkPieceBusinessLogicContract.cs | 2 +- TheSoftBedProject/TheSoftBedProject.sln | 8 +++- 9 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/Implementations/CollectBusinessLogicContract.cs create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/Implementations/FurnitureBusinessLogicContract.cs create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/Implementations/PostBusinessLogicContract.cs create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/Implementations/SalaryBusinessLogicContract.cs create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkPieceBusinessLogicContract.cs create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkerBusinessLogicContract.cs create mode 100644 TheSoftBedProject/SoftBedBusinessLogic/SoftBedBusinessLogic.csproj diff --git a/TheSoftBedProject/SoftBedBusinessLogic/Implementations/CollectBusinessLogicContract.cs b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/CollectBusinessLogicContract.cs new file mode 100644 index 0000000..f395ef0 --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/CollectBusinessLogicContract.cs @@ -0,0 +1,31 @@ +using SoftBedContracts.BusinessLogicsContracts; +using SoftBedContracts.DataModels; + +namespace SoftBedBusinessLogic.Implementations; + +internal class CollectBusinessLogicContract : ICollectBusinessLogicContract +{ + public List GetAllCollectByPeriod(DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllCollectByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllCollectsByFurnitureByPeriod(string furnitureId, DateTime fromDate, DateTime toDate) + { + return []; + } + + public CollectDataModel GetCollectByData(string data) + { + return new("", "", "", 0); + } + + public void InsertCollect(CollectDataModel collectDataModel) + { + } +} diff --git a/TheSoftBedProject/SoftBedBusinessLogic/Implementations/FurnitureBusinessLogicContract.cs b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/FurnitureBusinessLogicContract.cs new file mode 100644 index 0000000..52b730e --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/FurnitureBusinessLogicContract.cs @@ -0,0 +1,35 @@ +using SoftBedContracts.BusinessLogicsContracts; +using SoftBedContracts.DataModels; +using SoftBedContracts.Enums; + +namespace SoftBedBusinessLogic.Implementations; + +internal class FurnitureBusinessLogicContract : IFurnitureBusinessLogicContract +{ + + + public List GetAllFurniture(bool onlyActive = true) + { + return []; + } + public List GetFurnitureHistoryByFurniture(string furnitureId) + { + return []; + } + + public FurnitureDataModel GetFurnitureByData(string data) + { + return new("", "", FurnitureType.None, 0, false, []); + } + + public void InsertFurniture(FurnitureDataModel furnitureDataModel) + { + } + + public void UpdateFurniture(FurnitureDataModel furnitureDataModel) + { + } + public void DeleteFurniture(string id) + { + } +} diff --git a/TheSoftBedProject/SoftBedBusinessLogic/Implementations/PostBusinessLogicContract.cs b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/PostBusinessLogicContract.cs new file mode 100644 index 0000000..f2d4559 --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/PostBusinessLogicContract.cs @@ -0,0 +1,40 @@ +using SoftBedContracts.BusinessLogicsContracts; +using SoftBedContracts.DataModels; +using SoftBedContracts.Enums; + +namespace SoftBedBusinessLogic.Implementations; + +internal class PostBusinessLogicContract : IPostBusinessLogicContract +{ + + public List GetAllDataOfPost(string postId) + { + return []; + } + + public List GetAllPosts(bool onlyActive) + { + return []; + + } + + public PostDataModel GetPostByData(string data) + { + return new("", "", PostType.None, 0, true, DateTime.Now); + } + + public void InsertPost(PostDataModel postDataModel) + { + } + + public void RestorePost(string id) + { + } + + public void UpdatePost(PostDataModel postDataModel) + { + } + public void DeletePost(string id) + { + } +} diff --git a/TheSoftBedProject/SoftBedBusinessLogic/Implementations/SalaryBusinessLogicContract.cs b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/SalaryBusinessLogicContract.cs new file mode 100644 index 0000000..def0cac --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/SalaryBusinessLogicContract.cs @@ -0,0 +1,21 @@ +using SoftBedContracts.BusinessLogicsContracts; +using SoftBedContracts.DataModels; + +namespace SoftBedBusinessLogic.Implementations; + +internal class SalaryBusinessLogicContract : ISalaryBusinessLogicContract +{ + public void CalculateSalaryByMonth(DateTime date) + { + } + + public List GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllSalariesByPeriodByWorker(DateTime fromDate, DateTime toDate, string workerId) + { + return []; + } +} diff --git a/TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkPieceBusinessLogicContract.cs b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkPieceBusinessLogicContract.cs new file mode 100644 index 0000000..75876d6 --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkPieceBusinessLogicContract.cs @@ -0,0 +1,30 @@ +using SoftBedContracts.BusinessLogicsContracts; +using SoftBedContracts.DataModels; + +namespace SoftBedBusinessLogic.Implementations; + +internal class WorkPieceBusinessLogicContract : IWorkPieceBusinessLogicContract +{ + + public List GetAllWorkPieces() + { + return []; + } + + public WorkPieceDataModel GetWorkPiecesByData(string data) + { + return new("", "", 0); + } + + public void InsertPost(WorkPieceDataModel workPieceDataModel) + { + } + + public void UpdatePost(WorkPieceDataModel workPieceDataModel) + { + } + public void DeletePost(string id) + { + } + +} diff --git a/TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkerBusinessLogicContract.cs b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkerBusinessLogicContract.cs new file mode 100644 index 0000000..71e46ca --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/Implementations/WorkerBusinessLogicContract.cs @@ -0,0 +1,43 @@ +using SoftBedContracts.BusinessLogicsContracts; +using SoftBedContracts.DataModels; + +namespace SoftBedBusinessLogic.Implementations; + +internal class WorkerBusinessLogicContract : IWorkerBusinessLogicContract +{ + public List GetAllWorkers() + { + return []; + } + + public List GetAllWorkersByBirthDate(DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllWorkersByEmploymentDate(DateTime fromDate, DateTime toDate) + { + return []; + } + + public List GetAllWorkersByPost(string postId) + { + return []; + } + + public WorkerDataModel GetWorkerByData(string data) + { + return new("", "", "", DateTime.Now, DateTime.Now); + } + + public void InsertWorker(WorkerDataModel workerDataModel) + { + } + + public void UpdateWorker(WorkerDataModel workerDataModel) + { + } + public void DeleteWorker(string id) + { + } +} diff --git a/TheSoftBedProject/SoftBedBusinessLogic/SoftBedBusinessLogic.csproj b/TheSoftBedProject/SoftBedBusinessLogic/SoftBedBusinessLogic.csproj new file mode 100644 index 0000000..fa44d1a --- /dev/null +++ b/TheSoftBedProject/SoftBedBusinessLogic/SoftBedBusinessLogic.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/TheSoftBedProject/SoftBedContracts/BusinessLogicsContracts/IWorkPieceBusinessLogicContract.cs b/TheSoftBedProject/SoftBedContracts/BusinessLogicsContracts/IWorkPieceBusinessLogicContract.cs index 4e754e7..6f7ed1c 100644 --- a/TheSoftBedProject/SoftBedContracts/BusinessLogicsContracts/IWorkPieceBusinessLogicContract.cs +++ b/TheSoftBedProject/SoftBedContracts/BusinessLogicsContracts/IWorkPieceBusinessLogicContract.cs @@ -6,7 +6,7 @@ public interface IWorkPieceBusinessLogicContract { List GetAllWorkPieces(); - List GetWorkPiecesByData(string data); + WorkPieceDataModel GetWorkPiecesByData(string data); void InsertPost(WorkPieceDataModel workPieceDataModel); diff --git a/TheSoftBedProject/TheSoftBedProject.sln b/TheSoftBedProject/TheSoftBedProject.sln index 16d749c..4ff36df 100644 --- a/TheSoftBedProject/TheSoftBedProject.sln +++ b/TheSoftBedProject/TheSoftBedProject.sln @@ -5,7 +5,9 @@ VisualStudioVersion = 17.9.34728.123 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftBedContracts", "SoftBedContracts\SoftBedContracts.csproj", "{B0AF813F-CC99-4892-AA65-4CDB225B7AA3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoftBedTests", "SoftBedTests\SoftBedTests.csproj", "{0E56A9DB-177A-4114-B437-DE0F6C9711F4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SoftBedTests", "SoftBedTests\SoftBedTests.csproj", "{0E56A9DB-177A-4114-B437-DE0F6C9711F4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoftBedBusinessLogic", "SoftBedBusinessLogic\SoftBedBusinessLogic.csproj", "{C64D5EFE-D645-459C-8E48-F42ED08261C4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,6 +23,10 @@ Global {0E56A9DB-177A-4114-B437-DE0F6C9711F4}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E56A9DB-177A-4114-B437-DE0F6C9711F4}.Release|Any CPU.ActiveCfg = Release|Any CPU {0E56A9DB-177A-4114-B437-DE0F6C9711F4}.Release|Any CPU.Build.0 = Release|Any CPU + {C64D5EFE-D645-459C-8E48-F42ED08261C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C64D5EFE-D645-459C-8E48-F42ED08261C4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C64D5EFE-D645-459C-8E48-F42ED08261C4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C64D5EFE-D645-459C-8E48-F42ED08261C4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE