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

This commit is contained in:
Adelina888 2025-02-20 18:28:44 +04:00
parent 07f7204aab
commit a7bfe8177a
7 changed files with 254 additions and 0 deletions

View File

@ -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<OrderDataModel> GetAllOrdersByPeriod(DateTime fromDate, DateTime toDate)
{
return [];
}
public List<OrderDataModel> GetAllOrdersByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate)
{
return [];
}
public List<OrderDataModel> GetAllOrdersByRestaurantByPeriod(string restaurantId, DateTime fromDate, DateTime toDate)
{
return [];
}
public List<OrderDataModel> 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)
{
}
}

View File

@ -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<PostDataModel> GetAllPosts(bool onlyActive)
{
return [];
}
public List<PostDataModel> 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)
{
}
}

View File

@ -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<ProductDataModel> GetAllProducts(bool onlyActive = true)
{
return [];
}
public List<ProductDataModel> GetAllProductsByRestaurant(string restaurantId, 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,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<RestaurantDataModel> 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)
{
}
}

View File

@ -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<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,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<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

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>