From a328d413fa996cab3d921681ceab64417850dc25 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Wed, 17 Apr 2024 22:01:38 +0400 Subject: [PATCH 1/9] =?UTF-8?q?=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0=20=D1=81=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=B0=D0=BA=D1=82=D0=B0=D0=BC?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComputerHardwareStore/ComputerHardwareStore.sln | 6 ++++++ .../ComputerHardwareStoreContracts.csproj | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj diff --git a/ComputerHardwareStore/ComputerHardwareStore.sln b/ComputerHardwareStore/ComputerHardwareStore.sln index e96d3cb..3c6075c 100644 --- a/ComputerHardwareStore/ComputerHardwareStore.sln +++ b/ComputerHardwareStore/ComputerHardwareStore.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStore", "Co EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStoreDataModels", "ComputerHardwareStoreDataModels\ComputerHardwareStoreDataModels.csproj", "{48126915-C6D4-451C-BC88-39E3C50332B8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStoreContracts", "ComputerHardwareStoreContracts\ComputerHardwareStoreContracts.csproj", "{5F394E21-2597-432B-AE73-BBAFD8D9F50E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {48126915-C6D4-451C-BC88-39E3C50332B8}.Debug|Any CPU.Build.0 = Debug|Any CPU {48126915-C6D4-451C-BC88-39E3C50332B8}.Release|Any CPU.ActiveCfg = Release|Any CPU {48126915-C6D4-451C-BC88-39E3C50332B8}.Release|Any CPU.Build.0 = Release|Any CPU + {5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F394E21-2597-432B-AE73-BBAFD8D9F50E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj b/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + From f952809b0ee520c8b1905d267467c92fd73386b7 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Wed, 17 Apr 2024 22:21:46 +0400 Subject: [PATCH 2/9] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComputerHardwareStoreDataModels/Models/IOrderModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs index bddb1f6..045b5dd 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs @@ -4,6 +4,7 @@ { double Cost { get; } DateTime DateCreate { get; } + int StoreKeeperId { get; } public Dictionary OrderProduct { get; } } } From 1a9edefdb9022a7165dc75cec1e58ef142166adb Mon Sep 17 00:00:00 2001 From: dex_moth Date: Thu, 18 Apr 2024 15:03:40 +0400 Subject: [PATCH 3/9] viewmodels --- .../ViewModels/BuildModelContracts.cs | 16 +++++++++++++++ .../ViewModels/CommentModelContracts.cs | 12 +++++++++++ .../ViewModels/ComponentModelContracts.cs | 14 +++++++++++++ .../ViewModels/OrderModelContracts.cs | 15 ++++++++++++++ .../ViewModels/ProductModelContracts.cs | 16 +++++++++++++++ .../ViewModels/PurchaseModelContracts.cs | 20 +++++++++++++++++++ .../ViewModels/StoreKeeperModelContracts.cs | 16 +++++++++++++++ .../ViewModels/VendorModelContracts.cs | 16 +++++++++++++++ 8 files changed, 125 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/BuildModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/CommentModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ComponentModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/OrderModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ProductModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/PurchaseModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/StoreKeeperModelContracts.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/VendorModelContracts.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/BuildModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/BuildModelContracts.cs new file mode 100644 index 0000000..10ccf1b --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/BuildModelContracts.cs @@ -0,0 +1,16 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class BuildModelContracts : IBuildModel + { + public int Id { get; set; } + [DisplayName("Название сборки")] + public string BuildName { get; } + [DisplayName("Стоимость")] + public double Price { get; } + public int VendorId { get; } + public Dictionary BuildComponent { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/CommentModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/CommentModelContracts.cs new file mode 100644 index 0000000..ff666ee --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/CommentModelContracts.cs @@ -0,0 +1,12 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class CommentModelContracts : ICommentModel + { + public int Id { get; set; } + public DateTime Date { get; set; } + public string Text { get; set; } + public int BuildId { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ComponentModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ComponentModelContracts.cs new file mode 100644 index 0000000..6bc7d6a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ComponentModelContracts.cs @@ -0,0 +1,14 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class ComponentModelContracts : IComponentModel + { + public int Id { get; set; } + [DisplayName("Название компонента")] + public string ComponentName { get; set; } = string.Empty; + [DisplayName("Цена")] + public double Cost { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/OrderModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/OrderModelContracts.cs new file mode 100644 index 0000000..0a56ec2 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/OrderModelContracts.cs @@ -0,0 +1,15 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class OrderModelContracts : IOrderModel + { + public int Id { get; set; } + [DisplayName("Стоимость")] + public double Cost { get; set; } + [DisplayName("Дата создания")] + DateTime DateCreate { get; set; } + public Dictionary OrderProduct { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ProductModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ProductModelContracts.cs new file mode 100644 index 0000000..6a38c07 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/ProductModelContracts.cs @@ -0,0 +1,16 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class ProductModelContracts : IProductModel + { + public int Id { get; set; } + [DisplayName("Название изделия")] + public string CannedName { get; set; } + [DisplayName("Цена")] + public double Price { get; set; } + public Dictionary CannedComponents { get; set; } = new(); + + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/PurchaseModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/PurchaseModelContracts.cs new file mode 100644 index 0000000..345e839 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/PurchaseModelContracts.cs @@ -0,0 +1,20 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class PurchaseModelContracts : IPurchaseModel + { + public int Id { get; set; } + [DisplayName("Стоимость")] + public double Cost { get; set; } + [DisplayName("Дата создания")] + public DateTime DateCreate { get; set; } + public int VendorId { get; set; } + [DisplayName("Сумма")] + public double Sum { get; set; } + public Dictionary PurchaseBuild { get; set; } + + public Dictionary PurchaseProduct { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/StoreKeeperModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/StoreKeeperModelContracts.cs new file mode 100644 index 0000000..6659ebf --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/StoreKeeperModelContracts.cs @@ -0,0 +1,16 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class StoreKeeperModelContracts : IStoreKeeperModel + { + public int Id { get; set; } + [DisplayName("Имя кладовщика")] + public string Name { get; set; } + [DisplayName("Логин")] + public string Login { get; set; } + [DisplayName("Пароль")] + public string Password { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/VendorModelContracts.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/VendorModelContracts.cs new file mode 100644 index 0000000..1eb35eb --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ViewModels/VendorModelContracts.cs @@ -0,0 +1,16 @@ +using ComputerHardwareStoreDataModels.Models; +using System.ComponentModel; + +namespace ComputerHardwareStoreContracts.ViewModels +{ + public class VendorModelContracts : IVendorModel + { + public int Id { get; set; } + [DisplayName("Имя продавца")] + public string Name { get; set; } + [DisplayName("Логин")] + public string Login { get; set; } + [DisplayName("Пароль")] + public string Password { get; set; } + } +} \ No newline at end of file From 8b9ee21fb9aa5c6b93760d527693e4d5db478979 Mon Sep 17 00:00:00 2001 From: dex_moth Date: Thu, 18 Apr 2024 15:29:39 +0400 Subject: [PATCH 4/9] =?UTF-8?q?searchmodels=20(=D0=BD=D0=B5=20=D0=B7=D0=BD?= =?UTF-8?q?=D0=B0=D1=8E,=20=D0=BD=D1=83=D0=B6=D0=BD=D0=B0=20=D0=BB=D0=B8?= =?UTF-8?q?=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8C=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0,=20=D0=BD?= =?UTF-8?q?=D0=BE=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchModels/BuildSearchModel.cs | 8 ++++++++ .../SearchModels/CommentSearchModel.cs | 8 ++++++++ .../SearchModels/ComponentSearchModel.cs | 8 ++++++++ .../SearchModels/OrderSearchModel.cs | 9 +++++++++ .../SearchModels/ProductSearchModel.cs | 8 ++++++++ .../SearchModels/PurchaseSearchModel.cs | 9 +++++++++ .../SearchModels/StoreKeeperSearchModel.cs | 9 +++++++++ .../SearchModels/VendorSearchModel.cs | 9 +++++++++ 8 files changed, 68 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs new file mode 100644 index 0000000..3ad2c4a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class BuildSearchModel + { + public int? Id { get; set; } + public string? BuildName { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs new file mode 100644 index 0000000..1378964 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class CommentSearchModel + { + public int? Id { get; set; } + public DateTime? Date { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs new file mode 100644 index 0000000..08a0f78 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class ComponentSearchModel + { + public int? Id { get; set; } + public string? ComponentName { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs new file mode 100644 index 0000000..7dafd43 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class OrderSearchModel + { + public int? Id { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs new file mode 100644 index 0000000..3a42376 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class ProductSearchModel + { + public int? Id { get; set; } + public string? ProductName { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs new file mode 100644 index 0000000..7464e92 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class PurchaseSearchModel + { + public int? Id { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs new file mode 100644 index 0000000..e069ba1 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class StoreKeeperSearchModel + { + public int? Id { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs new file mode 100644 index 0000000..f15394a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class VendorSearchModel + { + public int? Id { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } + } +} From eee043483aa277b8745e4103ab0257c9eef86144 Mon Sep 17 00:00:00 2001 From: dex_moth Date: Thu, 18 Apr 2024 15:30:21 +0400 Subject: [PATCH 5/9] =?UTF-8?q?Revert=20"searchmodels=20(=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=B7=D0=BD=D0=B0=D1=8E,=20=D0=BD=D1=83=D0=B6=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BB=D0=B8=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8C=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?,=20=D0=BD=D0=BE=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=D0=B0)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8b9ee21fb9aa5c6b93760d527693e4d5db478979. --- .../SearchModels/BuildSearchModel.cs | 8 -------- .../SearchModels/CommentSearchModel.cs | 8 -------- .../SearchModels/ComponentSearchModel.cs | 8 -------- .../SearchModels/OrderSearchModel.cs | 9 --------- .../SearchModels/ProductSearchModel.cs | 8 -------- .../SearchModels/PurchaseSearchModel.cs | 9 --------- .../SearchModels/StoreKeeperSearchModel.cs | 9 --------- .../SearchModels/VendorSearchModel.cs | 9 --------- 8 files changed, 68 deletions(-) delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs delete mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs deleted file mode 100644 index 3ad2c4a..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class BuildSearchModel - { - public int? Id { get; set; } - public string? BuildName { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs deleted file mode 100644 index 1378964..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class CommentSearchModel - { - public int? Id { get; set; } - public DateTime? Date { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs deleted file mode 100644 index 08a0f78..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class ComponentSearchModel - { - public int? Id { get; set; } - public string? ComponentName { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs deleted file mode 100644 index 7dafd43..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class OrderSearchModel - { - public int? Id { get; set; } - public DateTime? DateFrom { get; set; } - public DateTime? DateTo { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs deleted file mode 100644 index 3a42376..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class ProductSearchModel - { - public int? Id { get; set; } - public string? ProductName { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs deleted file mode 100644 index 7464e92..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class PurchaseSearchModel - { - public int? Id { get; set; } - public DateTime? DateFrom { get; set; } - public DateTime? DateTo { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs deleted file mode 100644 index e069ba1..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class StoreKeeperSearchModel - { - public int? Id { get; set; } - public string? Email { get; set; } - public string? Password { get; set; } - } -} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs deleted file mode 100644 index f15394a..0000000 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace ComputerHardwareStoreContracts.SearchModels -{ - public class VendorSearchModel - { - public int? Id { get; set; } - public string? Email { get; set; } - public string? Password { get; set; } - } -} From 176b3bfc9d44cadde9747bda2d7c9a5ea8015174 Mon Sep 17 00:00:00 2001 From: dex_moth Date: Thu, 18 Apr 2024 15:32:47 +0400 Subject: [PATCH 6/9] =?UTF-8?q?searchmodels,=20=D0=BD=D0=BE=20=D0=BD=D1=83?= =?UTF-8?q?=D0=B6=D0=BD=D0=BE=20=D0=BB=D0=B8=20=D0=B4=D0=BB=D1=8F=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchModels/BuildSearchModel.cs | 8 ++++++++ .../SearchModels/CommentSearchModel.cs | 8 ++++++++ .../SearchModels/ComponentSearchModel.cs | 8 ++++++++ .../SearchModels/OrderSearchModel.cs | 9 +++++++++ .../SearchModels/ProductSearchModel.cs | 8 ++++++++ .../SearchModels/PurchaseSearchModel.cs | 9 +++++++++ .../SearchModels/StoreKeeperSearchModel.cs | 9 +++++++++ .../SearchModels/VendorSearchModel.cs | 9 +++++++++ 8 files changed, 68 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs new file mode 100644 index 0000000..3ad2c4a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/BuildSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class BuildSearchModel + { + public int? Id { get; set; } + public string? BuildName { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs new file mode 100644 index 0000000..1378964 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/CommentSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class CommentSearchModel + { + public int? Id { get; set; } + public DateTime? Date { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs new file mode 100644 index 0000000..08a0f78 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ComponentSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class ComponentSearchModel + { + public int? Id { get; set; } + public string? ComponentName { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs new file mode 100644 index 0000000..7dafd43 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/OrderSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class OrderSearchModel + { + public int? Id { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs new file mode 100644 index 0000000..3a42376 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/ProductSearchModel.cs @@ -0,0 +1,8 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class ProductSearchModel + { + public int? Id { get; set; } + public string? ProductName { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs new file mode 100644 index 0000000..7464e92 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/PurchaseSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class PurchaseSearchModel + { + public int? Id { get; set; } + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs new file mode 100644 index 0000000..e069ba1 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/StoreKeeperSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class StoreKeeperSearchModel + { + public int? Id { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs new file mode 100644 index 0000000..f15394a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/SearchModels/VendorSearchModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreContracts.SearchModels +{ + public class VendorSearchModel + { + public int? Id { get; set; } + public string? Email { get; set; } + public string? Password { get; set; } + } +} From d48b7ac0dee23df7a6c7d6b87b92ff4fbcb3bacf Mon Sep 17 00:00:00 2001 From: dex_moth Date: Thu, 18 Apr 2024 16:47:15 +0400 Subject: [PATCH 7/9] bindingmodels --- .../BindingModels/BuildBindingModel.cs | 13 +++++++++++++ .../BindingModels/CommentBindingModel.cs | 12 ++++++++++++ .../BindingModels/ComponentBindingModel.cs | 11 +++++++++++ .../BindingModels/OrderBindingModel.cs | 15 +++++++++++++++ .../BindingModels/ProductBindingModel.cs | 12 ++++++++++++ .../BindingModels/PurchaseBindingModel.cs | 15 +++++++++++++++ .../BindingModels/StoreKeeperBindingModel.cs | 12 ++++++++++++ .../BindingModels/VendorBindingModel.cs | 12 ++++++++++++ .../ComputerHardwareStoreContracts.csproj | 4 ++++ 9 files changed, 106 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs new file mode 100644 index 0000000..a90636c --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs @@ -0,0 +1,13 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class BuildBindingModel : IBindingModel + { + public int Id { get; set; } + public string BuildName { get; set; } = string.Empty; + public double Price { get; set; } + public int VendorId { get; set; } + public Dictionary BuildComponent { get; set; } = new(); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs new file mode 100644 index 0000000..ac5cf8d --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs @@ -0,0 +1,12 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class CommentBindingModel : ICommentModel + { + public int Id { get; set; } + public DateTime Date { get; set; } = DateTime.Now; + public string Text { get; set; } = string.Empty; + public int BuildId { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs new file mode 100644 index 0000000..ecc9bc5 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs @@ -0,0 +1,11 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class ComponentBindingModel : IComponentModel + { + public int Id { get; set; } + public string ComponentName { get; set; } = string.Empty; + public double Cost { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs new file mode 100644 index 0000000..fb0a72d --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs @@ -0,0 +1,15 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class OrderBindingModel : IOrderModel + { + public int Id { get; set; } + public int CannedId { get; set; } + public int Count { get; set; } + public double Sum { get; set; } + public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; + public DateTime DateCreate { get; set; } = DateTime.Now; + public DateTime? DateImplement { get; set; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs new file mode 100644 index 0000000..78b8a2e --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs @@ -0,0 +1,12 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class ProductBindingModel : IProductModel + { + public int Id { get; set; } + public string ProductName { get; set; } = string.Empty; + public double Price { get; set; } + public Dictionary ProductComponents { get; set; } = new(); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs new file mode 100644 index 0000000..1e27ca0 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs @@ -0,0 +1,15 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class PurchaseBindingModel : IPurchaseModel + { + public int Id { get; set; } + public double Cost { get; set; } + public DateTime DateCreate { get; set; } + public int VendorId { get; set; } + public double Sum { get; set; } + public Dictionary PurchaseBuild { get; set; } = new(); + public Dictionary PurchaseProduct { get; set; } = new(); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs new file mode 100644 index 0000000..144ade0 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs @@ -0,0 +1,12 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class StoreKeeperBindingModel : IStoreKeeperModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public string Email { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs new file mode 100644 index 0000000..9f4dc29 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs @@ -0,0 +1,12 @@ +using ComputerHardwareStoreDataModels.Models; + +namespace ComputerHardwareStoreContracts.BindingModels +{ + public class VendorBindingModel : IVendorModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public string Email { get; set; } = string.Empty; + public string Password { get; set; } = string.Empty; + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj b/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj index fa71b7a..4e4937a 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj @@ -6,4 +6,8 @@ enable + + + + From 65599c80a26707f48cd1a1237bf27b6de63acc64 Mon Sep 17 00:00:00 2001 From: dex_moth Date: Wed, 24 Apr 2024 18:53:25 +0400 Subject: [PATCH 8/9] storage contract --- .../StorageContracts/IBuidStorage.cs | 12 ++++++++++++ .../StorageContracts/ICommentStorage.cs | 12 ++++++++++++ .../StorageContracts/IComponentStorage.cs | 12 ++++++++++++ .../StorageContracts/IOrderStorage.cs | 12 ++++++++++++ .../StorageContracts/IProductStorage.cs | 12 ++++++++++++ .../StorageContracts/IPurchaseStorage.cs | 12 ++++++++++++ .../StorageContracts/IStoreKeeperStorage.cs | 12 ++++++++++++ .../StorageContracts/IVendorStorage.cs | 12 ++++++++++++ 8 files changed, 96 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs new file mode 100644 index 0000000..45ec55c --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IBuidStorage + { + List GetFullList(); + List GetFilteredList(BuildSearchModel model); + BuildViewModel? GetElement(BuildSearchModel model); + BuildViewModel? Insert(BuildBindingModel model); + BuildViewModel? Update(BuildBindingModel model); + BuildViewModel? Delete(BuildBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs new file mode 100644 index 0000000..692e0a0 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface ICommentStorage + { + List GetFullList(); + List GetFilteredList(CommentSearchModel model); + CommentViewModel? GetElement(CommentSearchModel model); + CommentViewModel? Insert(CommentBindingModel model); + CommentViewModel? Update(CommentBindingModel model); + CommentViewModel? Delete(CommentBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs new file mode 100644 index 0000000..fb58859 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IComponentStorage + { + List GetFullList(); + List GetFilteredList(ComponentSearchModel model); + ComponentViewModel? GetElement(ComponentSearchModel model); + ComponentViewModel? Insert(ComponentBindingModel model); + ComponentViewModel? Update(ComponentBindingModel model); + ComponentViewModel? Delete(ComponentBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs new file mode 100644 index 0000000..072ab63 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IOrderStorage + { + List GetFullList(); + List GetFilteredList(OrderSearchModel model); + OrderViewModel? GetElement(OrderSearchModel model); + OrderViewModel? Insert(OrderBindingModel model); + OrderViewModel? Update(OrderBindingModel model); + OrderViewModel? Delete(OrderBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs new file mode 100644 index 0000000..8d20042 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IProductStorage + { + List GetFullList(); + List GetFilteredList(ProductSearchModel model); + ProductViewModel? GetElement(ProductSearchModel model); + ProductViewModel? Insert(ProductBindingModel model); + ProductViewModel? Update(ProductBindingModel model); + ProductViewModel? Delete(ProductBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs new file mode 100644 index 0000000..590b9f3 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IPurchaseStorage + { + List GetFullList(); + List GetFilteredList(PurchaseSearchModel model); + PurchaseViewModel? GetElement(PurchaseSearchModel model); + PurchaseViewModel? Insert(PurchaseBindingModel model); + PurchaseViewModel? Update(PurchaseBindingModel model); + PurchaseViewModel? Delete(PurchaseBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs new file mode 100644 index 0000000..aea3bff --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IStoreKeeperStorage + { + List GetFullList(); + List GetFilteredList(StoreKeeperSearchModel model); + StoreKeeperViewModel? GetElement(StoreKeeperSearchModel model); + StoreKeeperViewModel? Insert(StoreKeeperBindingModel model); + StoreKeeperViewModel? Update(StoreKeeperBindingModel model); + StoreKeeperViewModel? Delete(StoreKeeperBindingModel model); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs new file mode 100644 index 0000000..76d03bf --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreContracts.StorageContracts +{ + public interface IVendorStorage + { + List GetFullList(); + List GetFilteredList(VendorSearchModel model); + VendorViewModel? GetElement(VendorSearchModel model); + VendorViewModel? Insert(VendorBindingModel model); + VendorViewModel? Update(VendorBindingModel model); + VendorViewModel? Delete(VendorBindingModel model); + } +} From 930e4ed316690677c4b9ad928a0e1cb9362e5a98 Mon Sep 17 00:00:00 2001 From: dex_moth Date: Wed, 24 Apr 2024 19:21:18 +0400 Subject: [PATCH 9/9] =?UTF-8?q?=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20usin?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StorageContracts/IBuidStorage.cs | 6 +++++- .../StorageContracts/ICommentStorage.cs | 6 +++++- .../StorageContracts/IComponentStorage.cs | 6 +++++- .../StorageContracts/IOrderStorage.cs | 6 +++++- .../StorageContracts/IProductStorage.cs | 6 +++++- .../StorageContracts/IPurchaseStorage.cs | 6 +++++- .../StorageContracts/IStoreKeeperStorage.cs | 6 +++++- .../StorageContracts/IVendorStorage.cs | 6 +++++- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs index 45ec55c..fba13ee 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IBuidStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IBuidStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs index 692e0a0..feea16e 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/ICommentStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface ICommentStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs index fb58859..c7e606d 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IComponentStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IComponentStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs index 072ab63..85a0104 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IOrderStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IOrderStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs index 8d20042..393f523 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IProductStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IProductStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs index 590b9f3..af6b649 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IPurchaseStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IPurchaseStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs index aea3bff..69f57d1 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IStoreKeeperStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IStoreKeeperStorage { diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs index 76d03bf..96c9e1a 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/StorageContracts/IVendorStorage.cs @@ -1,4 +1,8 @@ -namespace ComputerHardwareStoreContracts.StorageContracts +using ComputerHardwareStoreContracts.BindingModels; +using ComputerHardwareStoreContracts.SearchModels; +using ComputerHardwareStoreContracts.ViewModels; + +namespace ComputerHardwareStoreContracts.StorageContracts { public interface IVendorStorage {