From 7aa8ee51c128634af1877c41d98f702b6771c9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9?= Date: Sat, 1 Apr 2023 12:50:44 +0400 Subject: [PATCH] =?UTF-8?q?SearchModel=20=D0=A0=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchModels/BuildSearchModel.cs | 12 ++++++++++++ .../SearchModels/ClientSearchModel.cs | 15 +++++++++++++++ .../SearchModels/CommentSearchModel.cs | 11 +++++++++++ .../SearchModels/ComponentSearchModel.cs | 14 ++++++++++++++ .../SearchModels/GoodSearchModel.cs | 15 +++++++++++++++ .../SearchModels/OrderSearchModel.cs | 11 +++++++++++ .../SearchModels/PurchaseSearchModel.cs | 11 +++++++++++ .../ViewModels/BuildViewModel.cs | 2 +- .../ViewModels/CommentViewModel.cs | 2 +- .../ViewModels/ComponentViewModel.cs | 2 +- .../ViewModels/OrderViewModel.cs | 2 +- .../Enums/PurchaseStatus.cs | 6 ++---- 12 files changed, 95 insertions(+), 8 deletions(-) create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/BuildSearchModel.cs create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/ClientSearchModel.cs create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/CommentSearchModel.cs create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/ComponentSearchModel.cs create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/GoodSearchModel.cs create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/OrderSearchModel.cs create mode 100644 HardwareShop/HardwareShopContracts/SearchModels/PurchaseSearchModel.cs diff --git a/HardwareShop/HardwareShopContracts/SearchModels/BuildSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/BuildSearchModel.cs new file mode 100644 index 0000000..1178f0c --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/BuildSearchModel.cs @@ -0,0 +1,12 @@ +using FoodOrdersDataModels.Models; +using HardwareShopDataModels.Models; +using System.ComponentModel; +namespace FoodOrdersContracts.SearchModels +{ + public class BuildSearchModel + { + public int? Id { get; set; } + + public string? BuildName { get; set; } = string.Empty; + } +} diff --git a/HardwareShop/HardwareShopContracts/SearchModels/ClientSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/ClientSearchModel.cs new file mode 100644 index 0000000..0170492 --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/ClientSearchModel.cs @@ -0,0 +1,15 @@ +using FoodOrdersDataModels.Models; +using HardwareShopDataModels.Enums; +using System.ComponentModel; + +namespace FoodOrdersContracts.SearchModels +{ + public class ClientViewModel + { + public int? Id { get; set; } + + public string? Login { get; set; } = string.Empty; + + public string? Email { get; set; } = string.Empty; + } +} \ No newline at end of file diff --git a/HardwareShop/HardwareShopContracts/SearchModels/CommentSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/CommentSearchModel.cs new file mode 100644 index 0000000..7ad2d93 --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/CommentSearchModel.cs @@ -0,0 +1,11 @@ +using FoodOrdersDataModels.Models; +using HardwareShopDataModels.Models; +using System.ComponentModel; + +namespace FoodOrdersContracts.SearchModels +{ + public class CommentSearchModel + { + public int? Id { get; set; } + } +} diff --git a/HardwareShop/HardwareShopContracts/SearchModels/ComponentSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/ComponentSearchModel.cs new file mode 100644 index 0000000..f038692 --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/ComponentSearchModel.cs @@ -0,0 +1,14 @@ +using HardwareShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FoodOrdersContracts.SearchModels +{ + public class ComponentSearchModel + { + public int? Id { get; set; } + } +} diff --git a/HardwareShop/HardwareShopContracts/SearchModels/GoodSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/GoodSearchModel.cs new file mode 100644 index 0000000..8c7d620 --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/GoodSearchModel.cs @@ -0,0 +1,15 @@ +using FoodOrdersDataModels.Enums; +using HardwareShopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FoodOrdersContracts.SearchModels +{ + public class GoodViewModel + { + public int? Id { get; set; } + } +} diff --git a/HardwareShop/HardwareShopContracts/SearchModels/OrderSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/OrderSearchModel.cs new file mode 100644 index 0000000..b651b13 --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/OrderSearchModel.cs @@ -0,0 +1,11 @@ +using FoodOrdersDataModels.Enums; +using FoodOrdersDataModels.Models; +using HardwareShopDataModels.Models; +using System.ComponentModel; +namespace FoodOrdersContracts.SearchModels +{ + public class OrderSearchModel + { + public int? Id { get; set; } + } +} diff --git a/HardwareShop/HardwareShopContracts/SearchModels/PurchaseSearchModel.cs b/HardwareShop/HardwareShopContracts/SearchModels/PurchaseSearchModel.cs new file mode 100644 index 0000000..9fd02d1 --- /dev/null +++ b/HardwareShop/HardwareShopContracts/SearchModels/PurchaseSearchModel.cs @@ -0,0 +1,11 @@ +using FoodOrdersDataModels.Enums; +using FoodOrdersDataModels.Models; +using HardwareShopDataModels.Models; +using System.ComponentModel; +namespace FoodOrdersContracts.SearchModels +{ + public class PurachaseViewModel + { + public int? Id { get; set; } + } +} diff --git a/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs index 93e5ca1..cd2887f 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/BuildViewModel.cs @@ -3,7 +3,7 @@ using HardwareShopDataModels.Models; using System.ComponentModel; namespace FoodOrdersContracts.ViewModels { - public class BuildViewModel : IBuildModel + public class BuildSearchModel : IBuildModel { public int Id { get; set; } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs index f7c8cce..d1adc75 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/CommentViewModel.cs @@ -4,7 +4,7 @@ using System.ComponentModel; namespace FoodOrdersContracts.ViewModels { - public class CommentViewModel : ICommentModel + public class CommentSearchModel : ICommentModel { public int Id { get; set; } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs index b4e7e8f..6e798ab 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/ComponentViewModel.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace FoodOrdersContracts.ViewModels { - public class ComponentViewModel : IComponentModel + public class ComponentSearchModel : IComponentModel { public int Id { get; set; } } diff --git a/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs b/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs index c6c7758..9279237 100644 --- a/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs +++ b/HardwareShop/HardwareShopContracts/ViewModels/OrderViewModel.cs @@ -4,7 +4,7 @@ using HardwareShopDataModels.Models; using System.ComponentModel; namespace FoodOrdersContracts.ViewModels { - public class OrderViewModel : IOrderModel + public class OrderSearchModel : IOrderModel { public int Id { get; set; } } diff --git a/HardwareShop/HardwareShopDataModels/Enums/PurchaseStatus.cs b/HardwareShop/HardwareShopDataModels/Enums/PurchaseStatus.cs index b36a07f..b75cf6a 100644 --- a/HardwareShop/HardwareShopDataModels/Enums/PurchaseStatus.cs +++ b/HardwareShop/HardwareShopDataModels/Enums/PurchaseStatus.cs @@ -3,9 +3,7 @@ public enum PurchaseStatus { Неизвестен = -1, - Принят = 0, - Выполняется = 1, - Готов = 2, - Выдан = 3 + Выполняется = 0, + Выдан = 1 } } \ No newline at end of file