From 2c424c021d8e48911247a04bce9222c40ce04429 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 18:41:26 +0400 Subject: [PATCH 1/3] Enums + Models --- .../CarCenterDataModels.csproj | 5 ----- .../CarCenterDataModels/Enums/CarBrand.cs | 20 +++++++++++++++++++ .../CarCenterDataModels/Enums/CarClass.cs | 19 ++++++++++++++++++ .../CarCenterDataModels/Enums/DriveTypes.cs | 15 ++++++++++++++ .../Enums/EquipmentPackage.cs | 17 ++++++++++++++++ .../CarCenterDataModels/Enums/HelpDevices.cs | 17 ++++++++++++++++ .../CarCenterDataModels/Enums/TirePackage.cs | 16 +++++++++++++++ .../CarCenterDataModels/Enums/ToolKit.cs | 18 +++++++++++++++++ .../Models/IBundlingModel.cs | 17 ++++++++++++++++ .../CarCenterDataModels/Models/ICarModel.cs | 20 +++++++++++++++++++ .../Models/IFeatureModel.cs | 17 ++++++++++++++++ .../Models/IStorekeeperModel.cs | 19 ++++++++++++++++++ 12 files changed, 195 insertions(+), 5 deletions(-) create mode 100644 CarCenter/CarCenterDataModels/Enums/CarBrand.cs create mode 100644 CarCenter/CarCenterDataModels/Enums/CarClass.cs create mode 100644 CarCenter/CarCenterDataModels/Enums/DriveTypes.cs create mode 100644 CarCenter/CarCenterDataModels/Enums/EquipmentPackage.cs create mode 100644 CarCenter/CarCenterDataModels/Enums/HelpDevices.cs create mode 100644 CarCenter/CarCenterDataModels/Enums/TirePackage.cs create mode 100644 CarCenter/CarCenterDataModels/Enums/ToolKit.cs create mode 100644 CarCenter/CarCenterDataModels/Models/IBundlingModel.cs create mode 100644 CarCenter/CarCenterDataModels/Models/ICarModel.cs create mode 100644 CarCenter/CarCenterDataModels/Models/IFeatureModel.cs create mode 100644 CarCenter/CarCenterDataModels/Models/IStorekeeperModel.cs diff --git a/CarCenter/CarCenterDataModels/CarCenterDataModels.csproj b/CarCenter/CarCenterDataModels/CarCenterDataModels.csproj index 7264f69..132c02c 100644 --- a/CarCenter/CarCenterDataModels/CarCenterDataModels.csproj +++ b/CarCenter/CarCenterDataModels/CarCenterDataModels.csproj @@ -6,9 +6,4 @@ enable - - - - - diff --git a/CarCenter/CarCenterDataModels/Enums/CarBrand.cs b/CarCenter/CarCenterDataModels/Enums/CarBrand.cs new file mode 100644 index 0000000..72f1daa --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/CarBrand.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum CarBrand + { + Лада = 0, + Тойота = 1, + Опель = 2, + Митсубиси = 3, + Субару = 4, + Форд = 5, + Лексус = 6, + Шевроле = 7, + } +} diff --git a/CarCenter/CarCenterDataModels/Enums/CarClass.cs b/CarCenter/CarCenterDataModels/Enums/CarClass.cs new file mode 100644 index 0000000..632d8f8 --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/CarClass.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum CarClass + { + Седан = 0, + Хетчбек = 1, + Универсал = 2, + Кроссовер = 3, + Внедорожник = 4, + Купе = 5, + Кабриолет = 6, + } +} diff --git a/CarCenter/CarCenterDataModels/Enums/DriveTypes.cs b/CarCenter/CarCenterDataModels/Enums/DriveTypes.cs new file mode 100644 index 0000000..4cc547c --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/DriveTypes.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum DriveTypes + { + Полный = 0, + Передний = 1, + Задний = 2, + } +} diff --git a/CarCenter/CarCenterDataModels/Enums/EquipmentPackage.cs b/CarCenter/CarCenterDataModels/Enums/EquipmentPackage.cs new file mode 100644 index 0000000..5a89855 --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/EquipmentPackage.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum EquipmentPackage + { + УлучшенныеТормоза = 0, + ТурбоНабор = 1, + Компрессор = 2, + ДвигательV12 = 3, + ДвигательV16 = 4, + } +} diff --git a/CarCenter/CarCenterDataModels/Enums/HelpDevices.cs b/CarCenter/CarCenterDataModels/Enums/HelpDevices.cs new file mode 100644 index 0000000..da5ee1d --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/HelpDevices.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum HelpDevices + { + ABS = 0, + ECS = 1, + ПодушкиБезопасноти = 2, + GPS = 3, + Магнитола = 4, + } +} diff --git a/CarCenter/CarCenterDataModels/Enums/TirePackage.cs b/CarCenter/CarCenterDataModels/Enums/TirePackage.cs new file mode 100644 index 0000000..377f7fb --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/TirePackage.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum TirePackage + { + ЗимнийШипы = 0, + ЗимнийЛипучка = 1, + Летний = 2, + Демисезон = 3, + } +} diff --git a/CarCenter/CarCenterDataModels/Enums/ToolKit.cs b/CarCenter/CarCenterDataModels/Enums/ToolKit.cs new file mode 100644 index 0000000..6bc1bb5 --- /dev/null +++ b/CarCenter/CarCenterDataModels/Enums/ToolKit.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Enums +{ + public enum ToolKit + { + Чемоданчик = 0, + ЧемоданчикПро = 1, + Наборчик = 2, + НаборчикПро = 3, + ГаечныйНабор = 4, + ОтверточныйНабор = 5, + } +} diff --git a/CarCenter/CarCenterDataModels/Models/IBundlingModel.cs b/CarCenter/CarCenterDataModels/Models/IBundlingModel.cs new file mode 100644 index 0000000..b1b5d4f --- /dev/null +++ b/CarCenter/CarCenterDataModels/Models/IBundlingModel.cs @@ -0,0 +1,17 @@ +using CarCenterDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Models +{ + public interface IBundlingModel : IId + { + EquipmentPackage EquipmentPackage { get; } + TirePackage TirePackage { get; } + ToolKit ToolKit { get; } + double Price { get; } + } +} diff --git a/CarCenter/CarCenterDataModels/Models/ICarModel.cs b/CarCenter/CarCenterDataModels/Models/ICarModel.cs new file mode 100644 index 0000000..fd7cc10 --- /dev/null +++ b/CarCenter/CarCenterDataModels/Models/ICarModel.cs @@ -0,0 +1,20 @@ +using CarCenterDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Models +{ + public interface ICarModel : IId + { + CarBrand CarBrand { get; } + string Model { get; } + CarClass CarClass { get; } + int Year { get; } + double Price { get; } + int VINnumber { get; } + Dictionary CarBundlings { get; } + } +} diff --git a/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs b/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs new file mode 100644 index 0000000..f472138 --- /dev/null +++ b/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs @@ -0,0 +1,17 @@ +using CarCenterDataModels.Enums; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Models +{ + public interface IFeatureModel : IId + { + HelpDevices HelpDevice { get; } + string CabinColor { get; } + DriveTypes DriveType { get; } + double Price { get; } + } +} diff --git a/CarCenter/CarCenterDataModels/Models/IStorekeeperModel.cs b/CarCenter/CarCenterDataModels/Models/IStorekeeperModel.cs new file mode 100644 index 0000000..66a6db7 --- /dev/null +++ b/CarCenter/CarCenterDataModels/Models/IStorekeeperModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CarCenterDataModels.Models +{ + public interface IStorekeeperModel : IId + { + string Name { get; } + string Surname { get; } + string? Patronymic { get; } + string Password { get; } + string Email { get; } + int PhoneNumber { get; } + + } +} -- 2.25.1 From 36919d09023e510d5ec206a53d4129ad2dc64728 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 18:42:10 +0400 Subject: [PATCH 2/3] fix --- CarCenter/CarCenterDataModels/Enums/CarClass.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CarCenter/CarCenterDataModels/Enums/CarClass.cs b/CarCenter/CarCenterDataModels/Enums/CarClass.cs index 632d8f8..26e0001 100644 --- a/CarCenter/CarCenterDataModels/Enums/CarClass.cs +++ b/CarCenter/CarCenterDataModels/Enums/CarClass.cs @@ -12,7 +12,7 @@ namespace CarCenterDataModels.Enums Хетчбек = 1, Универсал = 2, Кроссовер = 3, - Внедорожник = 4, + Внедорожник = 4, Купе = 5, Кабриолет = 6, } -- 2.25.1 From 456d7e050959817194220eaaa4e217a5e64cdb5f 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 18:47:22 +0400 Subject: [PATCH 3/3] =?UTF-8?q?=D0=B7=D0=B0=D0=B1=D1=8B=D0=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CarCenter/CarCenterDataModels/Models/IFeatureModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs b/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs index f472138..408e46a 100644 --- a/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs +++ b/CarCenter/CarCenterDataModels/Models/IFeatureModel.cs @@ -13,5 +13,6 @@ namespace CarCenterDataModels.Models string CabinColor { get; } DriveTypes DriveType { get; } double Price { get; } + int CarID { get; } } } -- 2.25.1