PIbd-23 Gutorov I.A. Second LabWork #3

Open
vasmaae wants to merge 17 commits from Task_2_BusinessLogic into Task_1_Models
5 changed files with 90 additions and 0 deletions
Showing only changes of commit 765933f1de - Show all commits

View File

@ -0,0 +1,20 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.StoragesContracts;
public interface IComponentStorageContract
{
List<ComponentDataModel> GetList(bool onlyActive = true);
List<ComponentDataModel> GetHistoryByProductId(string componentId);
ComponentDataModel? GetElementById(string id);
ComponentDataModel? GetElementByName(string name);
void AddElement(ComponentDataModel componentDataModel);
void UpdElement(ComponentDataModel componentDataModel);
void DelElement(string id);
}

View File

@ -0,0 +1,22 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.StoragesContracts;
public interface IEmployeeStorageContract
{
List<EmployeeDataModel> GetList(bool onlyActive = true, string? postId = null,
DateTime? fromBirthDate = null, DateTime? toBirthDate = null,
DateTime? fromEmploymentDate = null, DateTime? toEmploymentDate = null);
EmployeeDataModel? GetElementById(string id);
EmployeeDataModel? GetElementByFIO(string fio);
EmployeeDataModel? GetElementByEmail(string email);
void AddElement(EmployeeDataModel employeeDataModel);
void UpdElement(EmployeeDataModel employeeDataModel);
void DelElement(string id);
}

View File

@ -0,0 +1,15 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.StoragesContracts;
public interface IInstallationStorageContract
{
List<InstallationDataModel> GetList(DateTime? startDate = null, DateTime? endDate = null,
string? employeeId = null, string? productId = null);
InstallationDataModel? GetElementById(string id);
void AddElement(InstallationDataModel installationDataModel);
void DelElement(string id);
}

View File

@ -0,0 +1,22 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.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,11 @@
using TheCyclopsContracts.DataModels;
namespace TheCyclopsContracts.StoragesContracts;
public interface ISalaryStorageContract
{
List<SalaryDataModel> GetList(DateTime startDate, DateTime endDate,
string? employeeId = null);
void AddElement(SalaryDataModel salaryDataModel);
}