В процессе
This commit is contained in:
parent
73eb6fffb4
commit
148a3bb6b9
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
|
||||
namespace PuferFishBusinessLogic.Implementationsж
|
||||
{
|
||||
internal class BuyerBusinessLogicContract(IBuyerStorageContract buyerStorageContract, ILogger logger) : IBuyerBusinessLogicContract
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IBuyerStorageContract _buyerStorageContract =
|
||||
buyerStorageContract;
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
|
||||
namespace PuferFishBusinessLogic.Implementations;
|
||||
|
||||
internal class PointsBusinessLogicContract(IPointsStorageContract pointsStorageContract, ISaleStorageContract saleStorageContract, IPostStorageContract
|
||||
postStorageContract, IBuyerStorageContract buyerStorageContract, ILogger logger) : IPointsBusinessLogicContract
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IPointsStorageContract _pointsStorageContract = pointsStorageContract;
|
||||
private readonly ISaleStorageContract _saleStorageContract = saleStorageContract;
|
||||
private readonly IPostStorageContract _postStorageContract = postStorageContract;
|
||||
private readonly IBuyerStorageContract _buyerStorageContract = buyerStorageContract;
|
||||
public List<PointsDataModel> GetAllPointsByPeriod(DateTime fromDate,
|
||||
DateTime toDate)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public List<PointsDataModel> GetAllPointsByPeriodByBuyer(DateTime fromDate, DateTime toDate, string buyerId)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public void CalculatePointsByMounth(DateTime date)
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.Enums;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
|
||||
namespace PuferFishBusinessLogic.Implementations;
|
||||
|
||||
internal class PostBusinessLogicContract(IPostStorageContract postStorageContract, ILogger logger) : IPostBusinessLogicContract
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IPostStorageContract _postStorageContract =
|
||||
postStorageContract;
|
||||
public List<PostDataModel> GetAllPosts(bool onlyActive = true)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public List<PostDataModel> GetAllDataOfPost(string postId)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public PostDataModel GetPostByData(string data)
|
||||
{
|
||||
return new("", "", PostType.None, true, DateTime.UtcNow);
|
||||
}
|
||||
public void InsertPost(PostDataModel postDataModel)
|
||||
{
|
||||
}
|
||||
public void UpdatePost(PostDataModel postDataModel)
|
||||
{
|
||||
}
|
||||
public void DeletePost(string id)
|
||||
{
|
||||
}
|
||||
public void RestorePost(string id)
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.Enums;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
|
||||
namespace PuferFishBusinessLogic.Implementations;
|
||||
|
||||
internal class ProductBusinessLogicContract(IProductStorageContract productStorageContract, ILogger logger) : IProductBusinessLogicContract
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IProductStorageContract _productStorageContract =
|
||||
productStorageContract;
|
||||
public List<ProductDataModel> GetAllProducts(bool onlyActive)
|
||||
{
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
|
||||
namespace PuferFishBusinessLogic.Implementations;
|
||||
|
||||
internal class SaleBusinessLogicContract(ISaleStorageContract saleStorageContract, ILogger logger) : ISaleBusinessLogicContract
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly ISaleStorageContract _saleStorageContract =
|
||||
saleStorageContract;
|
||||
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, 0, false, []);
|
||||
}
|
||||
public void InsertSale(SaleDataModel saleDataModel)
|
||||
{
|
||||
}
|
||||
public void CancelSale(string id)
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PuferFishContracts.BusinessLogicsContracts;
|
||||
using PuferFishContracts.DataModels;
|
||||
using PuferFishContracts.StoragesContracts;
|
||||
|
||||
namespace PuferFishBusinessLogic.Implementations;
|
||||
|
||||
internal class WorkerBusinessLogicContract(IWorkerStorageContract workerStorageContract, ILogger logger) : IWorkerBusinessLogicContract
|
||||
{
|
||||
private readonly ILogger _logger = logger;
|
||||
private readonly IWorkerStorageContract _workerStorageContract =
|
||||
workerStorageContract;
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PuferFishContracts\PuferFishContracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PuferFishContracts", "Pufer
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PuferFishTests", "PuferFishTests\PuferFishTests.csproj", "{6A249C1E-4321-4506-841B-2BCE80F550A5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PuferFishBusinessLogic", "PuferFishBusinessLogic\PuferFishBusinessLogic.csproj", "{6997CEC9-5AB7-40C0-9873-E51D2674187B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -21,6 +23,10 @@ Global
|
||||
{6A249C1E-4321-4506-841B-2BCE80F550A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6A249C1E-4321-4506-841B-2BCE80F550A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6A249C1E-4321-4506-841B-2BCE80F550A5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6997CEC9-5AB7-40C0-9873-E51D2674187B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6997CEC9-5AB7-40C0-9873-E51D2674187B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6997CEC9-5AB7-40C0-9873-E51D2674187B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6997CEC9-5AB7-40C0-9873-E51D2674187B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
Loading…
x
Reference in New Issue
Block a user