2024-02-22 01:58:33 +04:00
|
|
|
|
using AircraftPlantContracts.BindingModels;
|
|
|
|
|
using AircraftPlantContracts.SearchModels;
|
|
|
|
|
using AircraftPlantContracts.ViewModels;
|
|
|
|
|
using AircraftPlantDataModels.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AircraftPlantContracts.BusinessLogicsContracts
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Интерфейс для описания работы бизнес-логики для магазинов
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IShopLogic
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение списка
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
List<ShopViewModel>? ReadList(ShopSearchModel? model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение отдельной записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
ShopViewModel? ReadElement(ShopSearchModel model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Создание записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool Create(ShopBindingModel model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Изменение записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool Update(ShopBindingModel model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удаление записи
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool Delete(ShopBindingModel model);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавление изделия в магазин
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <param name="plane"></param>
|
|
|
|
|
/// <param name="count"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool AddPlaneInShop(ShopSearchModel model, IPlaneModel plane, int count);
|
2024-02-25 23:08:05 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Продажа изделий
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="plane"></param>
|
|
|
|
|
/// <param name="count"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
bool SellPlanes(IPlaneModel plane, int count);
|
2024-02-22 01:58:33 +04:00
|
|
|
|
}
|
|
|
|
|
}
|