From 590a9901cedfb26a0ea0344fc69bad7765a8d2e5 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sun, 5 Feb 2023 21:10:11 +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=D1=81=D1=83=D1=89=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ComponentBindingModel.cs | 7 ++++- .../BindingModels/OrderBindingModel.cs | 27 +++++++++++++++++++ .../BindingModels/ProductBindingModel.cs | 20 ++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/OrderBindingModel.cs create mode 100644 BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ProductBindingModel.cs diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ComponentBindingModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ComponentBindingModel.cs index d972681..6c523d6 100644 --- a/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ComponentBindingModel.cs +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ComponentBindingModel.cs @@ -3,11 +3,16 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BlacksmithWorkshopDataModels; +using BlacksmithWorkshopDataModels.Models; namespace BlacksmithWorkshopContracts.BindingModels { internal class ComponentBindingModel : IComponentModel { + public int Id { get; set; } + + public double Cost { get; set; } + + public string ComponentName { get; set; } = string.Empty; } } diff --git a/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/OrderBindingModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/OrderBindingModel.cs new file mode 100644 index 0000000..dfea827 --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/OrderBindingModel.cs @@ -0,0 +1,27 @@ +using BlacksmithWorkshopDataModels.Enums; +using BlacksmithWorkshopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BlacksmithWorkshopContracts.BindingModels +{ + internal class OrderBindingModel : IOrderModel + { + public int Id { get; set; } + + public int ProductId { 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/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ProductBindingModel.cs b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ProductBindingModel.cs new file mode 100644 index 0000000..f6a5c9e --- /dev/null +++ b/BlacksmithWorkshop/BlacksmithWorkshopContracts/BindingModels/ProductBindingModel.cs @@ -0,0 +1,20 @@ +using BlacksmithWorkshopDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BlacksmithWorkshopContracts.BindingModels +{ + internal 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(); + } +}