diff --git a/AircraftPlant/AircraftPlantContracts/BindingModels/ShopBindingModel.cs b/AircraftPlant/AircraftPlantContracts/BindingModels/ShopBindingModel.cs index 74d61f5..c8aa382 100644 --- a/AircraftPlant/AircraftPlantContracts/BindingModels/ShopBindingModel.cs +++ b/AircraftPlant/AircraftPlantContracts/BindingModels/ShopBindingModel.cs @@ -41,5 +41,10 @@ namespace AircraftPlantContracts.BindingModels get; set; } = new(); + + /// + /// Максимальное количество изделий + /// + public int MaxPlanes { get; set; } } } diff --git a/AircraftPlant/AircraftPlantContracts/BusinessLogicsContracts/IShopLogic.cs b/AircraftPlant/AircraftPlantContracts/BusinessLogicsContracts/IShopLogic.cs index f8bdb53..f23492d 100644 --- a/AircraftPlant/AircraftPlantContracts/BusinessLogicsContracts/IShopLogic.cs +++ b/AircraftPlant/AircraftPlantContracts/BusinessLogicsContracts/IShopLogic.cs @@ -58,5 +58,21 @@ namespace AircraftPlantContracts.BusinessLogicsContracts /// /// bool AddPlaneInShop(ShopSearchModel model, IPlaneModel plane, int count); + + /// + /// Добавление изделий в магазины + /// + /// + /// + /// + bool AddPlanes(IPlaneModel plane, int count); + + /// + /// Продажа изделий + /// + /// + /// + /// + bool SellPlanes(IPlaneModel plane, int count); } } diff --git a/AircraftPlant/AircraftPlantContracts/StoragesContracts/IShopStorage.cs b/AircraftPlant/AircraftPlantContracts/StoragesContracts/IShopStorage.cs index 9c89ffe..9dbabac 100644 --- a/AircraftPlant/AircraftPlantContracts/StoragesContracts/IShopStorage.cs +++ b/AircraftPlant/AircraftPlantContracts/StoragesContracts/IShopStorage.cs @@ -1,6 +1,7 @@ using AircraftPlantContracts.BindingModels; using AircraftPlantContracts.SearchModels; using AircraftPlantContracts.ViewModels; +using AircraftPlantDataModels.Models; using System; using System.Collections.Generic; using System.Linq; @@ -54,5 +55,13 @@ namespace AircraftPlantContracts.StoragesContracts /// /// ShopViewModel? Delete(ShopBindingModel model); + + /// + /// Продажа изделий + /// + /// + /// + /// + bool SellPlanes(IPlaneModel plane, int count); } } diff --git a/AircraftPlant/AircraftPlantContracts/ViewModels/ShopViewModel.cs b/AircraftPlant/AircraftPlantContracts/ViewModels/ShopViewModel.cs index 7ca01d7..44f1df3 100644 --- a/AircraftPlant/AircraftPlantContracts/ViewModels/ShopViewModel.cs +++ b/AircraftPlant/AircraftPlantContracts/ViewModels/ShopViewModel.cs @@ -45,5 +45,11 @@ namespace AircraftPlantContracts.ViewModels get; set; } = new(); + + /// + /// Максимальное количество изделий + /// + [DisplayName("Максимальное количество изделий")] + public int MaxPlanes { get; set; } } } diff --git a/AircraftPlant/AircraftPlantDataModels/Models/IShopModel.cs b/AircraftPlant/AircraftPlantDataModels/Models/IShopModel.cs index ca684fa..780d13a 100644 --- a/AircraftPlant/AircraftPlantDataModels/Models/IShopModel.cs +++ b/AircraftPlant/AircraftPlantDataModels/Models/IShopModel.cs @@ -30,5 +30,10 @@ namespace AircraftPlantDataModels.Models /// Коллекция изделий в магазине /// Dictionary ShopPlanes { get; } + + /// + /// Максимальное количество изделий + /// + int MaxPlanes { get; } } }