Заготовки реализаций

This commit is contained in:
2025-02-05 18:03:41 +04:00
parent b98947dd4b
commit 92377771a3
10 changed files with 263 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CatHasPawsContratcs\CatHasPawsContratcs.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,29 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
namespace CatHasPawsBusinessLogic.Implementations;
internal class BuyerBusinessLogicContract : IBuyerBusinessLogicContract
{
public List<BuyerDataModel> GetAllBuyers()
{
return [];
}
public BuyerDataModel GetBuyerByData(string data)
{
return new("", "", "", 0);
}
public void InsertBuyer(BuyerDataModel buyerDataModel)
{
}
public void UpdateBuyer(BuyerDataModel buyerDataModel)
{
}
public void DeleteBuyer(string id)
{
}
}

View File

@@ -0,0 +1,29 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
namespace CatHasPawsBusinessLogic.Implementations;
internal class ManufacturerBusinessLogicContract : IManufacturerBusinessLogicContract
{
public List<ManufacturerDataModel> GetAllManufacturers()
{
return [];
}
public ManufacturerDataModel GetManufacturerByData(string data)
{
return new("", "", null, null);
}
public void InsertManufacturer(ManufacturerDataModel manufacturerDataModel)
{
}
public void UpdateManufacturer(ManufacturerDataModel manufacturerDataModel)
{
}
public void DeleteManufacturer(string id)
{
}
}

View File

@@ -0,0 +1,39 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
using CatHasPawsContratcs.Enums;
namespace CatHasPawsBusinessLogic.Implementations;
internal class PostBusinessLogicContract : IPostBusinessLogicContract
{
public List<PostDataModel> GetAllPosts(bool onlyActive)
{
return [];
}
public List<PostDataModel> GetAllDataOfPost(string postId)
{
return [];
}
public PostDataModel GetPostByData(string data)
{
return new("", "", "", PostType.None, 0, true, DateTime.Now);
}
public void InsertPost(PostDataModel postDataModel)
{
}
public void UpdatePost(PostDataModel postDataModel)
{
}
public void DeletePost(string id)
{
}
public void RestorePost(string id)
{
}
}

View File

@@ -0,0 +1,40 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
using CatHasPawsContratcs.Enums;
namespace CatHasPawsBusinessLogic.Implementations;
internal class ProductBusinessLogicContract : IProductBusinessLogicContract
{
public List<ProductDataModel> GetAllProducts(bool onlyActive = true)
{
return [];
}
public List<ProductDataModel> GetAllProductsByManufacturer(string manufacturerId, bool onlyActive = true)
{
return [];
}
public List<ProductHistoryDataModel> 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)
{
}
}

View File

@@ -0,0 +1,21 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
namespace CatHasPawsBusinessLogic.Implementations;
internal class SalaryBusinessLogicContract : ISalaryBusinessLogicContract
{
public List<SalaryDataModel> GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate)
{
return [];
}
public List<SalaryDataModel> GetAllSalariesByPeriodByWorker(DateTime fromDate, DateTime toDate, string workerId)
{
return [];
}
public void CalculateSalaryByMounth(DateTime date)
{
}
}

View File

@@ -0,0 +1,41 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
using CatHasPawsContratcs.Enums;
namespace CatHasPawsBusinessLogic.Implementations;
internal class SaleBusinessLogicContract : ISaleBusinessLogicContract
{
public List<SaleDataModel> GetAllSalesByPeriod(DateTime fromDate, DateTime toDate)
{
return [];
}
public List<SaleDataModel> GetAllSalesByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate)
{
return [];
}
public List<SaleDataModel> GetAllSalesByBuyerByPeriod(string buyerId, DateTime fromDate, DateTime toDate)
{
return [];
}
public List<SaleDataModel> GetAllSalesByProductByPeriod(string productId, DateTime fromDate, DateTime toDate)
{
return [];
}
public SaleDataModel GetSaleByData(string data)
{
return new("", "", "", 0, DiscountType.None, 0, true, []);
}
public void InsertSale(SaleDataModel saleDataModel)
{
}
public void CancelSale(string id)
{
}
}

View File

@@ -0,0 +1,44 @@
using CatHasPawsContratcs.BusinessLogicsContracts;
using CatHasPawsContratcs.DataModels;
namespace CatHasPawsBusinessLogic.Implementations;
internal class WorkerBusinessLogicContract : IWorkerBusinessLogicContract
{
public List<WorkerDataModel> GetAllWorkers(bool onlyActive = true)
{
return [];
}
public List<WorkerDataModel> GetAllWorkersByPost(string postId, bool onlyActive = true)
{
return [];
}
public List<WorkerDataModel> GetAllWorkersByBirthDate(DateTime fromDate, DateTime toDate, bool onlyActive = true)
{
return [];
}
public List<WorkerDataModel> 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)
{
}
}

View File

@@ -2,7 +2,7 @@
namespace CatHasPawsContratcs.BusinessLogicsContracts;
internal interface ISaleBusinessLogicContract
public interface ISaleBusinessLogicContract
{
List<SaleDataModel> GetAllSalesByPeriod(DateTime fromDate, DateTime toDate);

View File

@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatHasPawsContratcs", "CatH
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatHasPawsTests", "CatHasPawsTests\CatHasPawsTests.csproj", "{18708BC0-17A1-4F6D-98FD-CECE1BDE3D92}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CatHasPawsBusinessLogic", "CatHasPawsBusinessLogic\CatHasPawsBusinessLogic.csproj", "{42EEABA6-5F1B-4552-8DDF-9974A2B89BCF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{18708BC0-17A1-4F6D-98FD-CECE1BDE3D92}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18708BC0-17A1-4F6D-98FD-CECE1BDE3D92}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18708BC0-17A1-4F6D-98FD-CECE1BDE3D92}.Release|Any CPU.Build.0 = Release|Any CPU
{42EEABA6-5F1B-4552-8DDF-9974A2B89BCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42EEABA6-5F1B-4552-8DDF-9974A2B89BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42EEABA6-5F1B-4552-8DDF-9974A2B89BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42EEABA6-5F1B-4552-8DDF-9974A2B89BCF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE