Классы с данными для отображения пользователю #4

Merged
mallafeev merged 1 commits from malafeevs_part into main 2024-04-28 11:35:36 +04:00
5 changed files with 106 additions and 1 deletions

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<Folder Include="ViewModels\" />
<Folder Include="SearchModels\" />
<Folder Include="BusinessLogicsContracts\" />
<Folder Include="StoragesContracts\" />
</ItemGroup>

View File

@ -0,0 +1,24 @@
using CarCenterDataModels.Enums;
using CarCenterDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.ViewModels
{
public class BundlingViewModel : IBundlingModel
{
public int Id { get; set; }
[DisplayName("Пакет оборудования")]
public EquipmentPackage EquipmentPackage { get; set; }
[DisplayName("Пакет шин")]
public TirePackage TirePackage { get; set; }
[DisplayName("Пакет инструментов")]
public ToolKit ToolKit { get; set; }
[DisplayName("Цена")]
public double Price { get; set; }
}
}

View File

@ -0,0 +1,30 @@
using CarCenterDataModels.Enums;
using CarCenterDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.ViewModels
{
public class CarViewModel : ICarModel
{
public int Id { get; set; }
[DisplayName("Марка")]
public CarBrand CarBrand { get; set; }
[DisplayName("Модель")]
public string Model { get; set; } = string.Empty;
[DisplayName("Класс")]
public CarClass CarClass { get; set; }
[DisplayName("Год выпуска")]
public int Year { get; set; }
[DisplayName("Цена")]
public double Price { get; set; }
[DisplayName("VIN-номер")]
public long VINnumber { get; set; }
public int FeatureID { get; set; }
public Dictionary<int, IBundlingModel> CarBundlings { get; set; } = new();
}
}

View File

@ -0,0 +1,24 @@
using CarCenterDataModels.Enums;
using CarCenterDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.ViewModels
{
public class FeatureViewModel : IFeatureModel
{
public int Id { get; set; }
[DisplayName("Вспомогательные устройства")]
public HelpDevices HelpDevice { get; set; }
[DisplayName("Цвет салона")]
public string CabinColor { get; set; } = string.Empty;
[DisplayName("Тип привода")]
public DriveTypes DriveType { get; set; }
[DisplayName("Цена")]
public double Price { get; set; }
}
}

View File

@ -0,0 +1,27 @@
using CarCenterDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.ViewModels
{
public class StorekeeperViewModel : IStorekeeperModel
{
public int Id { get; set; }
[DisplayName("Имя")]
public string Name { get; set; } = string.Empty;
[DisplayName("Фамилия")]
public string Surname { get; set; } = string.Empty;
[DisplayName("Отчество")]
public string? Patronymic { get; set; }
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
[DisplayName("Почта")]
public string Email { get; set; } = string.Empty;
[DisplayName("Номер телефона")]
public long PhoneNumber { get; set; }
}
}