From 80eb3374b1b40d97b7135ee106820efa9ea20bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2=D0=BE=D0=B9?= Date: Sun, 29 Jan 2023 18:59:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ProductBindingModel.cs => BouquetBindingModel.cs} | 6 +++--- .../BindingModels/OrderBindingModel.cs | 2 +- .../SearchModels/ProductSearchModel.cs | 4 ++-- FlowerShop/FlowerShopDataModels/IBouquetModel.cs | 9 +++++++++ FlowerShop/FlowerShopDataModels/IOrderModel.cs | 2 +- FlowerShop/FlowerShopDataModels/IProductModel.cs | 9 --------- 6 files changed, 16 insertions(+), 16 deletions(-) rename FlowerShop/FlowerShopContracts/BindingModels/{ProductBindingModel.cs => BouquetBindingModel.cs} (53%) create mode 100644 FlowerShop/FlowerShopDataModels/IBouquetModel.cs delete mode 100644 FlowerShop/FlowerShopDataModels/IProductModel.cs diff --git a/FlowerShop/FlowerShopContracts/BindingModels/ProductBindingModel.cs b/FlowerShop/FlowerShopContracts/BindingModels/BouquetBindingModel.cs similarity index 53% rename from FlowerShop/FlowerShopContracts/BindingModels/ProductBindingModel.cs rename to FlowerShop/FlowerShopContracts/BindingModels/BouquetBindingModel.cs index 28300bf..6db7a88 100644 --- a/FlowerShop/FlowerShopContracts/BindingModels/ProductBindingModel.cs +++ b/FlowerShop/FlowerShopContracts/BindingModels/BouquetBindingModel.cs @@ -2,11 +2,11 @@ namespace FlowerShopContracts.BindingModels { - public class ProductBindingModel : IProductModel + public class BouquetBindingModel : IBouquetModel { public int Id { get; set; } - public string ProductName { get; set; } = string.Empty; + public string BouquetName { get; set; } = string.Empty; public double Price { get; set; } - public Dictionary ProductComponents { get; set; } = new(); + public Dictionary BouquetComponents { get; set; } = new(); } } \ No newline at end of file diff --git a/FlowerShop/FlowerShopContracts/BindingModels/OrderBindingModel.cs b/FlowerShop/FlowerShopContracts/BindingModels/OrderBindingModel.cs index 7f94bb7..76cfd77 100644 --- a/FlowerShop/FlowerShopContracts/BindingModels/OrderBindingModel.cs +++ b/FlowerShop/FlowerShopContracts/BindingModels/OrderBindingModel.cs @@ -6,7 +6,7 @@ namespace FlowerShopContracts.BindingModels public class OrderBindingModel : IOrderModel { public int Id { get; set; } - public int ProductId { get; set; } + public int BouquetId { get; set; } public int Count { get; set; } public double Sum { get; set; } public OrderStatus Status { get; set; } = OrderStatus.Unknown; diff --git a/FlowerShop/FlowerShopContracts/SearchModels/ProductSearchModel.cs b/FlowerShop/FlowerShopContracts/SearchModels/ProductSearchModel.cs index 383ac75..75debc3 100644 --- a/FlowerShop/FlowerShopContracts/SearchModels/ProductSearchModel.cs +++ b/FlowerShop/FlowerShopContracts/SearchModels/ProductSearchModel.cs @@ -1,8 +1,8 @@ namespace FlowerShopContracts.SearchModels { - public class ProductSearchModel + public class BouquetSearchModel { public int? Id { get; set; } - public string? ProductName { get; set; } + public string? BouquetName { get; set; } } } diff --git a/FlowerShop/FlowerShopDataModels/IBouquetModel.cs b/FlowerShop/FlowerShopDataModels/IBouquetModel.cs new file mode 100644 index 0000000..29b973d --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/IBouquetModel.cs @@ -0,0 +1,9 @@ +namespace FlowerShopDataModels.Models +{ + public interface IBouquetModel : IId + { + string BouquetName { get; } + double Price { get; } + Dictionary BouquetComponents { get; } + } +} diff --git a/FlowerShop/FlowerShopDataModels/IOrderModel.cs b/FlowerShop/FlowerShopDataModels/IOrderModel.cs index 70be197..416bc78 100644 --- a/FlowerShop/FlowerShopDataModels/IOrderModel.cs +++ b/FlowerShop/FlowerShopDataModels/IOrderModel.cs @@ -4,7 +4,7 @@ namespace FlowerShopDataModels.Models { public interface IOrderModel : IId { - int ProductId { get; } + int BouquetId { get; } int Count { get; } double Sum { get; } OrderStatus Status { get; } diff --git a/FlowerShop/FlowerShopDataModels/IProductModel.cs b/FlowerShop/FlowerShopDataModels/IProductModel.cs deleted file mode 100644 index 73210af..0000000 --- a/FlowerShop/FlowerShopDataModels/IProductModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace FlowerShopDataModels.Models -{ - public interface IProductModel : IId - { - string ProductName { get; } - double Price { get; } - Dictionary ProductComponents { get; } - } -}