From f0384d599fcf764a375e6dd6d092cacdb6acd655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=9C=D0=B0=D0=BB?= =?UTF-8?q?=D0=B0=D1=84=D0=B5=D0=B5=D0=B2?= Date: Sat, 27 Apr 2024 19:19:34 +0400 Subject: [PATCH] BindingModels --- .../BindingModels/BundlingBindingModel.cs | 19 ++++++++++++++++ .../BindingModels/CarBindingModel.cs | 22 +++++++++++++++++++ .../BindingModels/FeatureBindingModel.cs | 20 +++++++++++++++++ .../BindingModels/StorekeeperBindingModel.cs | 20 +++++++++++++++++ .../CarCenterContracts.csproj | 1 - 5 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 CarCenter/CarCenterContracts/BindingModels/BundlingBindingModel.cs create mode 100644 CarCenter/CarCenterContracts/BindingModels/CarBindingModel.cs create mode 100644 CarCenter/CarCenterContracts/BindingModels/FeatureBindingModel.cs create mode 100644 CarCenter/CarCenterContracts/BindingModels/StorekeeperBindingModel.cs diff --git a/CarCenter/CarCenterContracts/BindingModels/BundlingBindingModel.cs b/CarCenter/CarCenterContracts/BindingModels/BundlingBindingModel.cs new file mode 100644 index 0000000..56e6257 --- /dev/null +++ b/CarCenter/CarCenterContracts/BindingModels/BundlingBindingModel.cs @@ -0,0 +1,19 @@ +using CarCenterDataModels.Enums; +using CarCenterDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.BindingModels +{ + public class BundlingBindingModel : IBundlingModel + { + public int Id { get; set; } + public EquipmentPackage EquipmentPackage { get; set; } + public TirePackage TirePackage { get; set; } + public ToolKit ToolKit { get; set; } + public double Price { get; set; } + } +} diff --git a/CarCenter/CarCenterContracts/BindingModels/CarBindingModel.cs b/CarCenter/CarCenterContracts/BindingModels/CarBindingModel.cs new file mode 100644 index 0000000..6a516c0 --- /dev/null +++ b/CarCenter/CarCenterContracts/BindingModels/CarBindingModel.cs @@ -0,0 +1,22 @@ +using CarCenterDataModels.Enums; +using CarCenterDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.BindingModels +{ + public class CarBindingModel : ICarModel + { + public int Id { get; set; } + public CarBrand CarBrand { get; set; } + public string Model { get; set; } = string.Empty; + public CarClass CarClass { get; set; } + public int Year { get; set; } + public double Price { get; set; } + public int VINnumber { get; set; } + public Dictionary CarBundlings { get; set; } = new(); + } +} diff --git a/CarCenter/CarCenterContracts/BindingModels/FeatureBindingModel.cs b/CarCenter/CarCenterContracts/BindingModels/FeatureBindingModel.cs new file mode 100644 index 0000000..6a4bc7d --- /dev/null +++ b/CarCenter/CarCenterContracts/BindingModels/FeatureBindingModel.cs @@ -0,0 +1,20 @@ +using CarCenterDataModels.Enums; +using CarCenterDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.BindingModels +{ + public class FeatureBindingModel : IFeatureModel + { + public int Id { get; set; } + public HelpDevices HelpDevice { get; set; } + public string CabinColor { get; set; } = string.Empty; + public DriveTypes DriveType { get; set; } + public double Price { get; set; } + public int CarID { get; set; } + } +} diff --git a/CarCenter/CarCenterContracts/BindingModels/StorekeeperBindingModel.cs b/CarCenter/CarCenterContracts/BindingModels/StorekeeperBindingModel.cs new file mode 100644 index 0000000..440868d --- /dev/null +++ b/CarCenter/CarCenterContracts/BindingModels/StorekeeperBindingModel.cs @@ -0,0 +1,20 @@ +using CarCenterDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterContracts.BindingModels +{ + public class StorekeeperBindingModel : IStorekeeperModel + { + public int Id { get; set; } + public string Name { get; set; } = string.Empty; + public string Surname { get; set; } = string.Empty; + public string? Patronymic { get; set; } + public string Password { get; set; } = string.Empty; + public string Email { get; set; } = string.Empty; + public long PhoneNumber { get; set; } + } +} diff --git a/CarCenter/CarCenterContracts/CarCenterContracts.csproj b/CarCenter/CarCenterContracts/CarCenterContracts.csproj index f69daeb..9f6ecee 100644 --- a/CarCenter/CarCenterContracts/CarCenterContracts.csproj +++ b/CarCenter/CarCenterContracts/CarCenterContracts.csproj @@ -7,7 +7,6 @@ -