Начал делать контракты бизнесс логики (16 минута)
This commit is contained in:
parent
c9359593b5
commit
2f340b93d5
@ -0,0 +1,18 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.BusinessLogicContracts;
|
||||
|
||||
public interface IBlankBusinessLogicContract
|
||||
{
|
||||
List<BlankDataModel> GetAllBlanks();
|
||||
BlankDataModel GetBlankByData(string data);
|
||||
void InsertBlank(BlankDataModel blankDataModel);
|
||||
void UpdateBlank(BlankDataModel blankDataModel);
|
||||
void DeleteBlank(string id);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.BuisinessLogicsContracts;
|
||||
|
||||
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,19 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.StoragesContracts;
|
||||
|
||||
public interface IManufacturerStorageContract
|
||||
{
|
||||
List<BlankDataModel> GetList();
|
||||
BlankDataModel? GetElementById(string id);
|
||||
BlankDataModel? GetElementByName(string name);
|
||||
BlankDataModel? GetElementByOldName(string name);
|
||||
void AddElement(BlankDataModel blankDataModel);
|
||||
void UpdElement(BlankDataModel blankDataModel);
|
||||
void DelElement(string id);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.StoragesContracts;
|
||||
|
||||
public interface ISaleStorageContract
|
||||
{
|
||||
List<CuttingDataModel> GetList(DateTime? startDate = null, DateTime? endDate =
|
||||
null, string? workerId = null, string? blankId = null, string? productId = null);
|
||||
CuttingDataModel? GetElementById(string id);
|
||||
void AddElement(CuttingDataModel cuttingDataModel);
|
||||
void DelElement(string id);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.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,20 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.StoragesContracts;
|
||||
|
||||
public interface IProductStorageContract
|
||||
{
|
||||
List<ProductDataModel> GetList(bool onlyActive = true, string? blankId = null);
|
||||
List<ProductHistoryDataModel> GetHistoryByProductId(string productId);
|
||||
ProductDataModel? GetElementById(string id);
|
||||
ProductDataModel? GetElementByName(string name);
|
||||
void AddElement(ProductDataModel productDataModel);
|
||||
void UpdElement(ProductDataModel productDataModel);
|
||||
void DelElement(string id);
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.StoragesContracts;
|
||||
public interface ISalaryStorageContract
|
||||
{
|
||||
List<SalaryDataModel> GetList(DateTime startDate, DateTime endDate, string?
|
||||
workerId = null);
|
||||
void AddElement(SalaryDataModel salaryDataModel);
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
using PapaCarloContracts.DataModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PapaCarloContracts.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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user