From a3dda97929dd4d125012b464d6007dbdb39cc15c Mon Sep 17 00:00:00 2001 From: dasha Date: Sat, 1 Apr 2023 15:44:23 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= =?UTF-8?q?=20=D0=B4=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 --- .../HardwareShopDataModels/Enums/OrderStatus.cs | 11 +++++++++++ .../HardwareShopDataModels/Enums/UserRole.cs | 8 +------- .../HardwareShopDataModels/Models/IComponentModel.cs | 3 +++ .../HardwareShopDataModels/Models/IGoodModel.cs | 12 +++++------- .../HardwareShopDataModels/Models/IOrderModel.cs | 11 ++++++++++- 5 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 HardwareShop/HardwareShopDataModels/Enums/OrderStatus.cs diff --git a/HardwareShop/HardwareShopDataModels/Enums/OrderStatus.cs b/HardwareShop/HardwareShopDataModels/Enums/OrderStatus.cs new file mode 100644 index 0000000..583169f --- /dev/null +++ b/HardwareShop/HardwareShopDataModels/Enums/OrderStatus.cs @@ -0,0 +1,11 @@ +namespace HardwareShopDataModels.Enums +{ + public enum OrderStatus + { + Неизвестен = -1, + Принят = 0, + Выполняется = 1, + Готов = 2, + Выдан = 3, + } +} diff --git a/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs b/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs index 13807b1..12e73d2 100644 --- a/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs +++ b/HardwareShop/HardwareShopDataModels/Enums/UserRole.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HardwareShopDataModels.Enums +namespace HardwareShopDataModels.Enums { public enum UserRole { diff --git a/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs b/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs index c5a820a..0aa9f98 100644 --- a/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs +++ b/HardwareShop/HardwareShopDataModels/Models/IComponentModel.cs @@ -2,5 +2,8 @@ { public interface IComponentModel : IId { + string ComponentName { get; } + double Cost { get; } + int UserId { get; } } } diff --git a/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs b/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs index fd830b4..322b317 100644 --- a/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs +++ b/HardwareShop/HardwareShopDataModels/Models/IGoodModel.cs @@ -1,12 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HardwareShopDataModels.Models +namespace HardwareShopDataModels.Models { public interface IGoodModel : IId { + string GoodName { get; } + double Price { get; } + int UserId { get; } + Dictionary GoodComponents { get; } } } diff --git a/HardwareShop/HardwareShopDataModels/Models/IOrderModel.cs b/HardwareShop/HardwareShopDataModels/Models/IOrderModel.cs index e97d889..b7b3c20 100644 --- a/HardwareShop/HardwareShopDataModels/Models/IOrderModel.cs +++ b/HardwareShop/HardwareShopDataModels/Models/IOrderModel.cs @@ -1,6 +1,15 @@ -namespace HardwareShopDataModels.Models +using HardwareShopDataModels.Enums; + +namespace HardwareShopDataModels.Models { public interface IOrderModel : IId { + int GoodId { get; } + int UserId { get; } + int Count { get; } + double Sum { get; } + OrderStatus Status { get; } + DateTime DateCreate { get; } + DateTime? DateImplement { get; } } }