new branch + contracts
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.BusinessLogicsContracts;
|
||||
|
||||
public interface IManufacturerBusinessLogicContract
|
||||
{
|
||||
List<ManufacturerDataModel> GetAllManufacturers();
|
||||
ManufacturerDataModel GetManufacturerByData(string data);
|
||||
void InsertManufacturer(ManufacturerDataModel manufacturerDataModel);
|
||||
void UpdateManufacturer(ManufacturerDataModel manufacturerDataModel);
|
||||
void DeleteManufacturer(string id);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.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);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.BusinessLogicsContracts;
|
||||
|
||||
public interface IRequestBusinessLogicContract
|
||||
{
|
||||
List<RequestDataModel> GetAllRequestsByPeriod(DateTime fromDate, DateTime toDate);
|
||||
List<RequestDataModel> GetAllRequestsByWorkerByPeriod(string workerId, DateTime fromDate, DateTime toDate);
|
||||
List<RequestDataModel> GetAllRequestsByProductByPeriod(string productId, DateTime fromDate, DateTime toDate);
|
||||
RequestDataModel GetRequestByData(string data);
|
||||
void InsertRequest(RequestDataModel requestDataModel);
|
||||
void CancelRequest(string id);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
|
||||
namespace SmallSoftwareContracts.BusinessLogicsContracts;
|
||||
|
||||
public interface ISalaryBusinessLogicContract
|
||||
{
|
||||
List<SalaryDataModel> GetAllSalariesByPeriod(DateTime fromDate, DateTime toDate);
|
||||
List<SalaryDataModel> GetAllSalariesByPeriodByWorker(DateTime fromDate, DateTime toDate, string workerId);
|
||||
void CalculateSalaryByMonth(DateTime date);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
|
||||
namespace SmallSoftwareContracts.BusinessLogicsContracts;
|
||||
|
||||
public interface ISoftwareBusinessLogicContract
|
||||
{
|
||||
List<SoftwareDataModel> GetAllSoftwares(bool onlyActive = true);
|
||||
List<SoftwareDataModel> GetAllSoftwaresByManufacturer(string manufacturerId,
|
||||
bool onlyActive = true);
|
||||
List<SoftwareHistoryDataModel> GetSoftwareHistoryBySoftware(string softwareId);
|
||||
SoftwareDataModel GetSoftwareByData(string data);
|
||||
void InsertSoftware(SoftwareDataModel softwareDataModel);
|
||||
void UpdateSoftware(SoftwareDataModel softwareDataModel);
|
||||
void DeleteSoftware(string id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
|
||||
namespace SmallSoftwareContracts.BusinessLogicsContracts;
|
||||
|
||||
public interface IWorkerBusinessLogicContract
|
||||
{
|
||||
List<WorkerDataModel> GetAllWorkers(bool onlyActive = true);
|
||||
List<WorkerDataModel> GetAllWorkersByPost(string postId, bool onlyActive = true);
|
||||
List<WorkerDataModel> GetAllWorkersByBirthDate(DateTime fromDate, DateTime toDate, bool onlyActive = true);
|
||||
List<WorkerDataModel> GetAllWorkersByEmploymentDate(DateTime fromDate,
|
||||
DateTime toDate, bool onlyActive = true);
|
||||
WorkerDataModel GetWorkerByData(string data);
|
||||
void InsertWorker(WorkerDataModel workerDataModel);
|
||||
void UpdateWorker(WorkerDataModel workerDataModel);
|
||||
void DeleteWorker(string id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
|
||||
namespace SmallSoftwareContracts.StoragesContracts;
|
||||
|
||||
public interface IManufacturerStorageContract
|
||||
{
|
||||
List<ManufacturerDataModel> GetList();
|
||||
ManufacturerDataModel? GetElementById(string id);
|
||||
ManufacturerDataModel? GetElementByName(string name);
|
||||
ManufacturerDataModel? GetElementByOldName(string name);
|
||||
void AddElement(ManufacturerDataModel manufacturerDataModel);
|
||||
void UpdElement(ManufacturerDataModel manufacturerDataModel);
|
||||
void DelElement(string id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
|
||||
namespace SmallSoftwareContracts.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);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.StoragesContracts;
|
||||
|
||||
public interface IRequestStorageContract
|
||||
{
|
||||
List<RequestDataModel> GetList(DateTime? startDate = null,
|
||||
DateTime? endDate = null, string? workerId = null, string? softwareId = null);
|
||||
RequestDataModel? GetElementById(string id);
|
||||
void AddElement(RequestDataModel requestDataModel);
|
||||
void DelElement(string id);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.StoragesContracts;
|
||||
|
||||
public interface ISalaryStorageContract
|
||||
{
|
||||
List<SalaryDataModel> GetList(DateTime startDate, DateTime endDate, string? workerId = null);
|
||||
void AddElement(SalaryDataModel salaryDataModel);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.StoragesContracts;
|
||||
|
||||
public interface ISoftwareStorageContract
|
||||
{
|
||||
List<SoftwareDataModel> GetList(bool onlyActive = true, string? manufacturerId = null);
|
||||
List<SoftwareHistoryDataModel> GetHistoryBySoftwareId(string softwareId);
|
||||
SoftwareDataModel? GetElementById(string id);
|
||||
SoftwareDataModel? GetElementByName(string name);
|
||||
void AddElement(SoftwareDataModel softwareDataModel);
|
||||
void UpdElement(SoftwareDataModel softwareDataModel);
|
||||
void DelElement(string id);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using SmallSoftwareContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SmallSoftwareContracts.StoragesContracts;
|
||||
|
||||
public interface IWorkerStorageContract
|
||||
{
|
||||
List<WorkerDataModel> GetList(bool onlyActive = true, 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);
|
||||
}
|
||||
Reference in New Issue
Block a user