Контракты

This commit is contained in:
rakhaliullov 2025-02-21 18:22:50 +04:00
parent 43e0e2afea
commit 2911a5dce1
12 changed files with 206 additions and 0 deletions

View File

@ -0,0 +1,16 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.BusinessLogicsContracts;
public interface ICollectBusinessLogicContract
{
List<CollectDataModel> GetAllCollectByPeriod(DateTime fromDate, DateTime toDate);
List<CollectDataModel> GetAllCollectByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate);
List<CollectDataModel> GetAllCollectsByFurnitureByPeriod(string furnitureId, DateTime fromDate, DateTime toDate);
CollectDataModel GetCollectByData(string data);
void InsertCollect(CollectDataModel collectDataModel);
}

View File

@ -0,0 +1,18 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.BusinessLogicsContracts;
public interface IFurnitureBusinessLogicContract
{
List<FurnitureDataModel> GetAllFurniture(bool onlyActive = true);
List<FurnitureHistoryDataModel> GetFurnitureHistoryByFurniture(string furnitureId);
FurnitureDataModel GetFurnitureByData(string data);
void InsertFurniture(FurnitureDataModel furnitureDataModel);
void UpdateFurniture(FurnitureDataModel furnitureDataModel);
void DeleteFurniture(string id);
}

View File

@ -0,0 +1,20 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.BusinessLogicsContracts;
public interface IPostBusinessLogicContract
{
List<PostDataModel> GetAllPosts(bool onlyActive);
List<PostDataModel> GetAllDataOfPost(string postId);
PostDataModel GetPostByData(string data);
void InsertPost(PostDataModel postDataModel);
void UpdatePost(PostDataModel postDataModel);
void DeletePost(string id);
void RestorePost(string id);
}

View File

@ -0,0 +1,12 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.BusinessLogicsContracts;
public interface ISalaryBusinessLogicContract
{
List<SalaryDataModel> GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate);
List<SalaryDataModel> GetAllSalariesByPeriodByWorker(DateTime fromDate, DateTime toDate, string workerId);
void CalculateSalaryByMonth(DateTime date);
}

View File

@ -0,0 +1,16 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.BusinessLogicsContracts;
public interface IWorkPieceBusinessLogicContract
{
List<WorkPieceDataModel> GetAllWorkPieces();
List<WorkPieceDataModel> GetWorkPiecesByData(string data);
void InsertPost(WorkPieceDataModel workPieceDataModel);
void UpdatePost(WorkPieceDataModel workPieceDataModel);
void DeletePost(string id);
}

View File

@ -0,0 +1,22 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.BusinessLogicsContracts;
public interface IWorkerBusinessLogicContract
{
List<WorkerDataModel> GetAllWorkers();
List<WorkerDataModel> GetAllWorkersByPost(string postId);
List<WorkerDataModel> GetAllWorkersByBirthDate(DateTime fromDate, DateTime toDate);
List<WorkerDataModel> GetAllWorkersByEmploymentDate(DateTime fromDate, DateTime toDate);
WorkerDataModel GetWorkerByData(string data);
void InsertWorker(WorkerDataModel workerDataModel);
void UpdateWorker(WorkerDataModel workerDataModel);
void DeleteWorker(string id);
}

View File

@ -0,0 +1,14 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.StoragesContracts;
public interface ICollectStorageContract
{
List<CollectDataModel> GetList(DateTime? startDate = null, DateTime? endDate = null, string? workerId = null, string? furnitureId = null);
CollectDataModel? GetElementById(string id);
void AddElement(CollectDataModel collectDataModel);
void DelElement(string id);
}

View File

@ -0,0 +1,20 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.StoragesContracts;
public interface IFurnitureStorageContract
{
List<FurnitureDataModel> GetList(bool onlyActive = true);
List<FurnitureDataModel> GetHistoryByFurnitureId(string furnitureId);
FurnitureDataModel? GetElementById(string id);
FurnitureDataModel? GetElementByName(string name);
void AddElement(FurnitureDataModel furnitureDataModel);
void UpdElement(FurnitureDataModel furnitureDataModel);
void DelElement(string id);
}

View File

@ -0,0 +1,22 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.StoragesContracts;
public interface IPostStorageContract
{
List<PostDataModel> GetList(bool onlyActual = true);
List<PostDataModel> GetPostWithHistory(string postId);
PostDataModel? GetElementById(string id);
PostDataModel? GetElementByName(string name);
void AddElement(PostDataModel postDataModel);
void UpdElement(PostDataModel postDataModel);
void DelElement(string id);
void ResElement(string id);
}

View File

@ -0,0 +1,10 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.StoragesContracts;
public interface ISalaryStorageContract
{
List<SalaryDataModel> GetList(DateTime startDate, DateTime endDate, string? workerId = null);
void AddElement(SalaryDataModel salaryDataModel);
}

View File

@ -0,0 +1,18 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.StoragesContracts;
public interface IWorkPieceStorageContract
{
List<WorkPieceDataModel> GetList();
WorkPieceDataModel? GetElementById(string id);
WorkPieceDataModel? GetElementBySize(string size);
void AddElement(WorkPieceDataModel workPieceDataModel);
void UpdElement(WorkPieceDataModel workPieceDataModel);
void DelElement(string id);
}

View File

@ -0,0 +1,18 @@
using SoftBedContracts.DataModels;
namespace SoftBedContracts.StoragesContracts;
public interface IWorkerStorageContract
{
List<WorkerDataModel> GetList(string? postId = null, DateTime? fromBirthDate = null, DateTime? toBirthDate = null, DateTime? fromEmploymentDate = null, DateTime? toEmploymentDate = null);
WorkerDataModel? GetElementById(string id);
WorkerDataModel? GetElementByFIO(string fio);
void AddElement(WorkerDataModel workerDataModel);
void UpdElement(WorkerDataModel workerDataModel);
void DelElement(string id);
}