From 2fda39d8cc68d2cf82bf01d639d63df157407e4c Mon Sep 17 00:00:00 2001 From: Ismailov_Rovshan Date: Wed, 5 Apr 2023 22:22:20 +0400 Subject: [PATCH] Binding --- .../BindingModels/FurnitureBindingModel.cs | 22 +++++++++++++++++++ .../BindingModels/HeadsetModuleModel.cs | 20 +++++++++++++++++ .../BindingModels/MaterialBindingModel.cs | 20 +++++++++++++++++ .../Models/IMaterialModel.cs | 2 +- 4 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 FurnitureFactory/FurnitureContracts/BindingModels/FurnitureBindingModel.cs create mode 100644 FurnitureFactory/FurnitureContracts/BindingModels/HeadsetModuleModel.cs create mode 100644 FurnitureFactory/FurnitureContracts/BindingModels/MaterialBindingModel.cs diff --git a/FurnitureFactory/FurnitureContracts/BindingModels/FurnitureBindingModel.cs b/FurnitureFactory/FurnitureContracts/BindingModels/FurnitureBindingModel.cs new file mode 100644 index 0000000..0a7a40c --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/BindingModels/FurnitureBindingModel.cs @@ -0,0 +1,22 @@ +using FurnitureFactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FurnitureContracts.BindingModels +{ + public class FurnitureBindingModel : IFurnitureModel + { + public string Name { get; set; } = string.Empty; + + public string Color { get; set; } = string.Empty; + + public string Type { get; set; } = string.Empty; + + public Dictionary FurnitureMaterial { get; set; } + + public int Id { get; set; } + } +} diff --git a/FurnitureFactory/FurnitureContracts/BindingModels/HeadsetModuleModel.cs b/FurnitureFactory/FurnitureContracts/BindingModels/HeadsetModuleModel.cs new file mode 100644 index 0000000..9c2b8cc --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/BindingModels/HeadsetModuleModel.cs @@ -0,0 +1,20 @@ +using FurnitureFactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FurnitureContracts.BindingModels +{ + internal class HeadsetModuleModel : IHeadsetModuleModel + { + public string Style { get; set; } = string.Empty; + + public int Cost { get; set; } + + public int UserID { get; set; } + + public int Id { get; set; } + } +} diff --git a/FurnitureFactory/FurnitureContracts/BindingModels/MaterialBindingModel.cs b/FurnitureFactory/FurnitureContracts/BindingModels/MaterialBindingModel.cs new file mode 100644 index 0000000..9ee9759 --- /dev/null +++ b/FurnitureFactory/FurnitureContracts/BindingModels/MaterialBindingModel.cs @@ -0,0 +1,20 @@ +using FurnitureFactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FurnitureContracts.BindingModels +{ + internal class MaterialBindingModel : IMaterialModel + { + public string Name { get; set; } = string.Empty; + + public int Cost { get; set; } + + public int userID { get; set; } + + public int Id { get; set; } + } +} diff --git a/FurnitureFactory/FurnitureFactoryDataModels/Models/IMaterialModel.cs b/FurnitureFactory/FurnitureFactoryDataModels/Models/IMaterialModel.cs index 1327645..796d8b9 100644 --- a/FurnitureFactory/FurnitureFactoryDataModels/Models/IMaterialModel.cs +++ b/FurnitureFactory/FurnitureFactoryDataModels/Models/IMaterialModel.cs @@ -9,7 +9,7 @@ namespace FurnitureFactoryDataModels.Models public interface IMaterialModel : IId { string Name { get; } - string Cost { get; } + int Cost { get; } int userID { get; } } }