From 8049b51388526838fda158a932b5eeda255b37e5 Mon Sep 17 00:00:00 2001 From: bekodeg Date: Wed, 17 Apr 2024 21:44:51 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9=20=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComputerHardwareStore/ComputerHardwareStore.sln | 6 ++++++ .../ComputerHardwareStoreDataModels.csproj | 9 +++++++++ .../Enums/OrderStatus.cs | 17 +++++++++++++++++ .../ComputerHardwareStoreDataModels/IId.cs | 7 +++++++ .../Models/IBuildModel.cs | 10 ++++++++++ .../Models/ICommentModel.cs | 9 +++++++++ .../Models/IComponentModel.cs | 9 +++++++++ .../Models/IOrderModel.cs | 9 +++++++++ .../Models/IProductModel.cs | 9 +++++++++ .../Models/IPurchaseModel.cs | 12 ++++++++++++ .../Models/IStoreKeeperModel.cs | 9 +++++++++ .../Models/IVendorModel.cs | 9 +++++++++ 12 files changed, 115 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/ComputerHardwareStoreDataModels.csproj create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Enums/OrderStatus.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/IId.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IBuildModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/ICommentModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IComponentModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IProductModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IPurchaseModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IStoreKeeperModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IVendorModel.cs diff --git a/ComputerHardwareStore/ComputerHardwareStore.sln b/ComputerHardwareStore/ComputerHardwareStore.sln index 09e5f22..e96d3cb 100644 --- a/ComputerHardwareStore/ComputerHardwareStore.sln +++ b/ComputerHardwareStore/ComputerHardwareStore.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.7.34031.279 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStore", "ComputerHardwareStore\ComputerHardwareStore.csproj", "{D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputerHardwareStoreDataModels", "ComputerHardwareStoreDataModels\ComputerHardwareStoreDataModels.csproj", "{48126915-C6D4-451C-BC88-39E3C50332B8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5DDEE2B-A0C4-430B-B00E-452BA1AB3DDA}.Release|Any CPU.Build.0 = Release|Any CPU + {48126915-C6D4-451C-BC88-39E3C50332B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/ComputerHardwareStoreDataModels.csproj b/ComputerHardwareStore/ComputerHardwareStoreDataModels/ComputerHardwareStoreDataModels.csproj new file mode 100644 index 0000000..fa71b7a --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/ComputerHardwareStoreDataModels.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Enums/OrderStatus.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Enums/OrderStatus.cs new file mode 100644 index 0000000..fd2869f --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Enums/OrderStatus.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ComputerHardwareStoreDataModels.Enums +{ + public enum OrderStatus + { + Неизвестен = -1, + Принят = 0, + Выполняется = 1, + Готов = 2, + Выдан = 3, + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/IId.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/IId.cs new file mode 100644 index 0000000..2a8525e --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/IId.cs @@ -0,0 +1,7 @@ +namespace ComputerHardwareStoreDataModels +{ + public interface IId + { + int Id { get; init; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IBuildModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IBuildModel.cs new file mode 100644 index 0000000..823f80c --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IBuildModel.cs @@ -0,0 +1,10 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IBuildModel : IId + { + string BuildName { get; } + double Price { get; } + int VendorId { get; } + public Dictionary BuildComponent { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/ICommentModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/ICommentModel.cs new file mode 100644 index 0000000..76d1cdd --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/ICommentModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface ICommentModel : IId + { + DateTime Date { get; } + string Text { get; } + int BuildId { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IComponentModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IComponentModel.cs new file mode 100644 index 0000000..36a9b87 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IComponentModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IComponentModel : IId + { + string ComponentName { get; } + double Cost { get; } + int StoreKeeperId { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs new file mode 100644 index 0000000..bddb1f6 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IOrderModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IOrderModel : IId + { + double Cost { get; } + DateTime DateCreate { get; } + public Dictionary OrderProduct { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IProductModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IProductModel.cs new file mode 100644 index 0000000..a460250 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IProductModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IProductModel : IId + { + string Name { get; } + double Price { get; } + public Dictionary ProductComponent { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IPurchaseModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IPurchaseModel.cs new file mode 100644 index 0000000..9e8ffb6 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IPurchaseModel.cs @@ -0,0 +1,12 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IPurchaseModel : IId + { + double Cost { get; } + DateTime DateCreate { get; } + int VendorId { get; } + double Sum { get; } + public Dictionary PurchaseBuild { get; } + public Dictionary PurchaseProduct { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IStoreKeeperModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IStoreKeeperModel.cs new file mode 100644 index 0000000..b73f69b --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IStoreKeeperModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IStoreKeeperModel : IId + { + string Name { get; } + string Login { get; } + string Password { get; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IVendorModel.cs b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IVendorModel.cs new file mode 100644 index 0000000..4975a70 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreDataModels/Models/IVendorModel.cs @@ -0,0 +1,9 @@ +namespace ComputerHardwareStoreDataModels.Models +{ + public interface IVendorModel : IId + { + string Name { get; } + string Login { get; } + string Password { get; } + } +}