diff --git a/JewelryStoreContracts/BindingModels/StoreBindingModel.cs b/JewelryStoreContracts/BindingModels/StoreBindingModel.cs index 9198ea6..4338199 100644 --- a/JewelryStoreContracts/BindingModels/StoreBindingModel.cs +++ b/JewelryStoreContracts/BindingModels/StoreBindingModel.cs @@ -17,5 +17,7 @@ namespace JewelryStoreContracts.BindingModels public Dictionary Jewels { get; set; } = new(); public int Id { get; set; } + + public int PackageMaxCount { get; set; } } } diff --git a/JewelryStoreContracts/BusinessLogicsContracts/IStoreLogic.cs b/JewelryStoreContracts/BusinessLogicsContracts/IStoreLogic.cs index 4bf2807..f04fddb 100644 --- a/JewelryStoreContracts/BusinessLogicsContracts/IStoreLogic.cs +++ b/JewelryStoreContracts/BusinessLogicsContracts/IStoreLogic.cs @@ -18,5 +18,7 @@ namespace JewelryStoreContracts.BusinessLogicsContracts bool Update(StoreBindingModel model); bool Delete(StoreBindingModel model); bool AddJewel(StoreSearchModel model, IJewelModel jewel, int quantity); + bool AddJewel(IJewelModel jewel, int quantity); + bool SellJewel(IJewelModel jewel, int quantity); } } diff --git a/JewelryStoreContracts/StoragesContracts/IStoreStorage.cs b/JewelryStoreContracts/StoragesContracts/IStoreStorage.cs index ded1a42..c0e7dfd 100644 --- a/JewelryStoreContracts/StoragesContracts/IStoreStorage.cs +++ b/JewelryStoreContracts/StoragesContracts/IStoreStorage.cs @@ -1,6 +1,7 @@ using JewelryStoreContracts.BindingModels; using JewelryStoreContracts.SearchModels; using JewelryStoreContracts.ViewModels; +using JewelryStoreDataModels.Models; using System; using System.Collections.Generic; using System.Linq; @@ -17,5 +18,6 @@ namespace JewelryStoreContracts.StoragesContracts StoreViewModel? Insert(StoreBindingModel model); StoreViewModel? Update(StoreBindingModel model); StoreViewModel? Delete(StoreBindingModel model); + bool SellJewel(IJewelModel model, int quantity); } } diff --git a/JewelryStoreContracts/ViewModels/StoreViewModel.cs b/JewelryStoreContracts/ViewModels/StoreViewModel.cs index 3487455..63c45cb 100644 --- a/JewelryStoreContracts/ViewModels/StoreViewModel.cs +++ b/JewelryStoreContracts/ViewModels/StoreViewModel.cs @@ -19,5 +19,8 @@ namespace JewelryStoreContracts.ViewModels public string StoreAdress { get; set; } = string.Empty; [DisplayName("Дата открытия")] public DateTime OpeningDate { get; set; } = DateTime.Now; + + [DisplayName("Вместимость магазина")] + public int PackageMaxCount { get; set; } } }