2024-03-11 10:09:10 +04:00
|
|
|
|
using SecuritySystemContracts.BindingModels;
|
|
|
|
|
using SecuritySystemContracts.SearchModels;
|
|
|
|
|
using SecuritySystemContracts.ViewModels;
|
|
|
|
|
using SecuritySystemDataModels.Models;
|
|
|
|
|
|
|
|
|
|
namespace SecuritySystemContracts.BusinessLogicsContracts
|
|
|
|
|
{
|
|
|
|
|
public interface IShopLogic
|
|
|
|
|
{
|
|
|
|
|
ShopViewModel? ReadElement(ShopSearchModel model);
|
|
|
|
|
List<ShopViewModel>? ReadList(ShopSearchModel? model);
|
|
|
|
|
bool Create(ShopBindingModel model);
|
|
|
|
|
bool Update(ShopBindingModel model);
|
|
|
|
|
bool Delete(ShopBindingModel model);
|
2024-04-08 12:36:34 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Продает продукт со всех магазинов в заданном количестве
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool SellSecures(ISecureModel model, int count);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Проверяет наличие определенного количества продукта суммарно по всем магазинам
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool CheckSecuresCount(ISecureModel model, int count);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Проверяет можно ли пополнить конкретный магазин продукцией в указанном количестве
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool CheckSupplySecures(ShopSearchModel shopSearchModel, int count);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Проверяет можно ли распределить во все магазины продукты в указанном количестве
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool CheckSupplySecures(int count);
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Пополняет конкретный магазин продуктом в указанном количестве
|
|
|
|
|
/// </summary>
|
2024-03-11 10:09:10 +04:00
|
|
|
|
bool SupplySecures(ShopSearchModel model, ISecureModel secure, int count);
|
2024-04-08 12:36:34 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Рапределяет по всем магазинам продукт в указанном количестве
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool SupplySecures(ISecureModel secure, int count);
|
2024-03-11 10:09:10 +04:00
|
|
|
|
}
|
|
|
|
|
}
|