From 5bf198916eb1133d4ec84ed002c9fd663703db3d 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:03:54 +0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FlowerShop/FlowerShop.sln | 6 ++++++ .../FlowerShopDataModels.csproj | 9 +++++++++ FlowerShop/FlowerShopDataModels/IComponentModel.cs | 8 ++++++++ FlowerShop/FlowerShopDataModels/IId.cs | 7 +++++++ FlowerShop/FlowerShopDataModels/IOrderModel.cs | 14 ++++++++++++++ FlowerShop/FlowerShopDataModels/IProductModel.cs | 9 +++++++++ FlowerShop/FlowerShopDataModels/OrderStatus.cs | 11 +++++++++++ 7 files changed, 64 insertions(+) create mode 100644 FlowerShop/FlowerShopDataModels/FlowerShopDataModels.csproj create mode 100644 FlowerShop/FlowerShopDataModels/IComponentModel.cs create mode 100644 FlowerShop/FlowerShopDataModels/IId.cs create mode 100644 FlowerShop/FlowerShopDataModels/IOrderModel.cs create mode 100644 FlowerShop/FlowerShopDataModels/IProductModel.cs create mode 100644 FlowerShop/FlowerShopDataModels/OrderStatus.cs diff --git a/FlowerShop/FlowerShop.sln b/FlowerShop/FlowerShop.sln index 1fb10d9..1885fb7 100644 --- a/FlowerShop/FlowerShop.sln +++ b/FlowerShop/FlowerShop.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.3.32825.248 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShop", "FlowerShop\FlowerShop.csproj", "{086CB019-AA3B-425A-87B0-26662D1F201F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowerShopDataModels", "FlowerShopDataModels\FlowerShopDataModels.csproj", "{FDC31847-CB24-4EBD-8CE5-852ED404CEAE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {086CB019-AA3B-425A-87B0-26662D1F201F}.Debug|Any CPU.Build.0 = Debug|Any CPU {086CB019-AA3B-425A-87B0-26662D1F201F}.Release|Any CPU.ActiveCfg = Release|Any CPU {086CB019-AA3B-425A-87B0-26662D1F201F}.Release|Any CPU.Build.0 = Release|Any CPU + {FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDC31847-CB24-4EBD-8CE5-852ED404CEAE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/FlowerShop/FlowerShopDataModels/FlowerShopDataModels.csproj b/FlowerShop/FlowerShopDataModels/FlowerShopDataModels.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/FlowerShopDataModels.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/FlowerShop/FlowerShopDataModels/IComponentModel.cs b/FlowerShop/FlowerShopDataModels/IComponentModel.cs new file mode 100644 index 0000000..05b4348 --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/IComponentModel.cs @@ -0,0 +1,8 @@ +namespace FlowerShopDataModels.Models +{ + public interface IComponentModel : IId + { + string ComponentName { get; } + double Cost { get; } + } +} diff --git a/FlowerShop/FlowerShopDataModels/IId.cs b/FlowerShop/FlowerShopDataModels/IId.cs new file mode 100644 index 0000000..dfec951 --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/IId.cs @@ -0,0 +1,7 @@ +namespace FlowerShopDataModels +{ + public interface IId + { + int Id { get; } + } +} diff --git a/FlowerShop/FlowerShopDataModels/IOrderModel.cs b/FlowerShop/FlowerShopDataModels/IOrderModel.cs new file mode 100644 index 0000000..70be197 --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/IOrderModel.cs @@ -0,0 +1,14 @@ +using FlowerShopDataModels.Enums; + +namespace FlowerShopDataModels.Models +{ + public interface IOrderModel : IId + { + int ProductId { get; } + int Count { get; } + double Sum { get; } + OrderStatus Status { get; } + DateTime DateCreate { get; } + DateTime? DateImplement { get; } + } +} diff --git a/FlowerShop/FlowerShopDataModels/IProductModel.cs b/FlowerShop/FlowerShopDataModels/IProductModel.cs new file mode 100644 index 0000000..73210af --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/IProductModel.cs @@ -0,0 +1,9 @@ +namespace FlowerShopDataModels.Models +{ + public interface IProductModel : IId + { + string ProductName { get; } + double Price { get; } + Dictionary ProductComponents { get; } + } +} diff --git a/FlowerShop/FlowerShopDataModels/OrderStatus.cs b/FlowerShop/FlowerShopDataModels/OrderStatus.cs new file mode 100644 index 0000000..583cc02 --- /dev/null +++ b/FlowerShop/FlowerShopDataModels/OrderStatus.cs @@ -0,0 +1,11 @@ +namespace FlowerShopDataModels.Enums +{ + public enum OrderStatus + { + Unknown = -1, + Accepted = 0, + Processing = 1, + Ready = 2, + Issued = 3 + } +}