Contracts пока с ошибками

This commit is contained in:
kamilia 2024-05-13 00:37:21 +04:00
parent fdfde37703
commit 6f58712782
25 changed files with 946 additions and 10 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.9.34723.18
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RouteDirectoryDataModels", "RouteDirectoryBusinessLogics\RouteDirectoryDataModels.csproj", "{69BE4B26-1636-4661-B3AA-A29C531223D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RouteDirectoryContracts", "RouteDirectoryContracts\RouteDirectoryContracts.csproj", "{2A635E80-4C36-404E-BD93-932BB9DDCC80}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{69BE4B26-1636-4661-B3AA-A29C531223D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69BE4B26-1636-4661-B3AA-A29C531223D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69BE4B26-1636-4661-B3AA-A29C531223D9}.Release|Any CPU.Build.0 = Release|Any CPU
{2A635E80-4C36-404E-BD93-932BB9DDCC80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A635E80-4C36-404E-BD93-932BB9DDCC80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A635E80-4C36-404E-BD93-932BB9DDCC80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A635E80-4C36-404E-BD93-932BB9DDCC80}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -6,9 +6,6 @@ using System.Threading.Tasks;
namespace RouteDirectoryDataModels.Models
{
/// <summary>
/// Интерфейс для модели расписания
/// </summary>
public interface IScheduleModel<T> : IId<T>
{
/// <summary>

View File

@ -6,9 +6,6 @@ using System.Threading.Tasks;
namespace RouteDirectoryDataModels.Models
{
/// <summary>
/// Интерфейс для модели остановки
/// </summary>
public interface IStopModel<T> : IId<T>
{
/// <summary>

View File

@ -7,10 +7,7 @@ using System.Threading.Tasks;
namespace RouteDirectoryDataModels.Models
{
/// <summary>
/// Интерфейс для модели транспорта
/// </summary>
public interface ITransportType<T> : IId<T>
public interface ITransportTypeModel<T> : IId<T>
{
/// <summary>
/// Тип транспортного средства

View File

@ -0,0 +1,37 @@
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BindingModels
{
public class RouteBindingModel : IRouteModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Название маршрута
/// </summary>
public string RouteNumber { get; set; } = string.Empty;
/// <summary>
/// Стоимость проезда
/// </summary>
public int Fare { get; set; }
/// <summary>
/// Идентификатор транспорта
/// </summary>
public int TransportId { get; set; }
/// <summary>
/// Коллекция остановок маршрута
/// </summary>
public Dictionary<int, (IStopModel, int)> RouteStops { get; set; } = new();
}
}

View File

@ -0,0 +1,37 @@
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BindingModels
{
public class ScheduleBindingModel : IScheduleModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Время отправления
/// </summary>
public DateTime StartTime { get; set; } = DateTime.MinValue;
/// <summary>
/// Время прибытия
/// </summary>
public DateTime EndTime { get; set; } = DateTime.MinValue;
/// <summary>
/// Периодичность движения транспорта
/// </summary>
public DateTime TrafficInterval { get; set; } = DateTime.MinValue;
/// <summary>
/// Идентификатор маршрута
/// </summary>
public int RouteId { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BindingModels
{
public class StopBindingModel : IStopModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Название остановки
/// </summary>
public string Name { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,32 @@
using RouteDirectoryDataModels.Enums;
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BindingModels
{
/// <summary>
/// Модель для передачи данных пользователя
/// в методы для сохранения данных для транспорта
/// </summary>
public class TransportTypeBindingModel : ITransportTypeModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Тип транспортного средства
/// </summary>
public TransportType Type { get; set; } = TransportType.Автобус;
/// <summary>
/// Вместимость (количество пассажиров)
/// </summary>
public int Capacity { get; set; }
}
}

View File

@ -0,0 +1,68 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BusinessLogicsContracts
{
public interface IRouteLogic
{
/// <summary>
/// Получение списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<RouteViewModel>? ReadList(RouteSearchModel? model);
/// <summary>
/// Получение списка из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<RouteViewModel>? ReadList(int count);
/// <summary>
/// Получение отдельной записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
RouteViewModel? ReadElement(RouteSearchModel model);
/// <summary>
/// Создание записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Create(RouteBindingModel model);
/// <summary>
/// Изменение записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Update(RouteBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Delete(RouteBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <returns></returns>
bool Delete();
/// <summary>
/// Удаление всех записей
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,71 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BusinessLogicsContracts
{
/// <summary>
/// Интерфейс для описания работы бизнес-логики для расписания
/// </summary>
public interface IScheduleLogic
{
/// <summary>
/// Получение списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<ScheduleViewModel>? ReadList(ScheduleSearchModel? model);
/// <summary>
/// Получение списка из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<ScheduleViewModel>? ReadList(int count);
/// <summary>
/// Получение отдельной записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
ScheduleViewModel? ReadElement(ScheduleSearchModel model);
/// <summary>
/// Создание записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Create(ScheduleBindingModel model);
/// <summary>
/// Изменение записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Update(ScheduleBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Delete(ScheduleBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <returns></returns>
bool Delete();
/// <summary>
/// Удаление всех записей
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,71 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BusinessLogicsContracts
{
/// <summary>
/// Интерфейс для описания работы бизнес-логики для остановок
/// </summary>
public interface IStopLogic
{
/// <summary>
/// Получение списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<StopViewModel>? ReadList(StopSearchModel? model);
/// <summary>
/// Получение списка из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<StopViewModel>? ReadList(int count);
/// <summary>
/// Получение отдельной записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
StopViewModel? ReadElement(StopSearchModel model);
/// <summary>
/// Создание записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Create(StopBindingModel model);
/// <summary>
/// Изменение записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Update(StopBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Delete(StopBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <returns></returns>
bool Delete();
/// <summary>
/// Удаление всех записей
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,71 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.BusinessLogicsContracts
{
/// <summary>
/// Интерфейс для описания работы бизнес-логики для транспорта
/// </summary>
public interface ITransportTypeLogic
{
/// <summary>
/// Получение списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<TransportTypeViewModel>? ReadList(TransportTypeSearchModel? model);
/// <summary>
/// Получение списка из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<TransportTypeViewModel>? ReadList(int count);
/// <summary>
/// Получение отдельной записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
TransportTypeViewModel? ReadElement(TransportTypeSearchModel model);
/// <summary>
/// Создание записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Create(TransportTypeBindingModel model);
/// <summary>
/// Изменение записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Update(TransportTypeBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
bool Delete(TransportTypeBindingModel model);
/// <summary>
/// Удаление записи
/// </summary>
/// <returns></returns>
bool Delete();
/// <summary>
/// Удаление всех записей
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\RouteDirectoryBusinessLogics\RouteDirectoryDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.SearchModels
{
public class RouteSearchModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int? Id { get; set; }
/// <summary>
/// Название маршрута
/// </summary>
public string? RouteNumber { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.SearchModels
{
public class ScheduleSearchModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.SearchModels
{
public class StopSearchModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int? Id { get; set; }
/// <summary>
/// Название остановки
/// </summary>
public string? Name { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.SearchModels
{
public class TransportTypeSearchModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,74 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.StoragesContracts
{
public interface IRouteStorage
{
/// <summary>
/// Получение полного списка
/// </summary>
/// <returns></returns>
List<RouteViewModel> GetFullList();
/// <summary>
/// Получение фильтрованного списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<RouteViewModel> GetFilteredList(RouteSearchModel model);
/// <summary>
/// Получить список из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<RouteViewModel> GetList(int count);
/// <summary>
/// Получение элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
RouteViewModel? GetElement(RouteSearchModel model);
/// <summary>
/// Добавление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
RouteViewModel? Insert(RouteBindingModel model);
/// <summary>
/// Редактирование элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
RouteViewModel? Update(RouteBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
RouteViewModel? Delete(RouteBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <returns></returns>
RouteViewModel? Delete();
/// <summary>
/// Удаление всех элементов
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,74 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.StoragesContracts
{
public interface IScheduleStorage
{
/// <summary>
/// Получение полного списка
/// </summary>
/// <returns></returns>
List<ScheduleViewModel> GetFullList();
/// <summary>
/// Получение фильтрованного списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<ScheduleViewModel> GetFilteredList(ScheduleSearchModel model);
/// <summary>
/// Получить список из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<ScheduleViewModel> GetList(int count);
/// <summary>
/// Получение элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
ScheduleViewModel? GetElement(ScheduleSearchModel model);
/// <summary>
/// Добавление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
ScheduleViewModel? Insert(ScheduleBindingModel model);
/// <summary>
/// Редактирование элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
ScheduleViewModel? Update(ScheduleBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
ScheduleViewModel? Delete(ScheduleBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <returns></returns>
ScheduleViewModel? Delete();
/// <summary>
/// Удаление всех элементов
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,74 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.StoragesContracts
{
public interface IStopStorage
{
/// <summary>
/// Получение полного списка
/// </summary>
/// <returns></returns>
List<StopViewModel> GetFullList();
/// <summary>
/// Получение фильтрованного списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<StopViewModel> GetFilteredList(StopSearchModel model);
/// <summary>
/// Получить список из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<StopViewModel> GetList(int count);
/// <summary>
/// Получение элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
StopViewModel? GetElement(StopSearchModel model);
/// <summary>
/// Добавление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
StopViewModel? Insert(StopBindingModel model);
/// <summary>
/// Редактирование элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
StopViewModel? Update(StopBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
StopViewModel? Delete(StopBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <returns></returns>
StopViewModel? Delete();
/// <summary>
/// Удаление всех элементов
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,74 @@
using RouteDirectoryContracts.BindingModels;
using RouteDirectoryContracts.SearchModels;
using RouteDirectoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.StoragesContracts
{
public interface ITransportTypeStorage
{
/// <summary>
/// Получение полного списка
/// </summary>
/// <returns></returns>
List<TransportTypeViewModel> GetFullList();
/// <summary>
/// Получение фильтрованного списка
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
List<TransportTypeViewModel> GetFilteredList(TransportTypeSearchModel model);
/// <summary>
/// Получить список из заданного количества элементов
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
List<TransportTypeViewModel> GetList(int count);
/// <summary>
/// Получение элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
TransportTypeViewModel? GetElement(TransportTypeSearchModel model);
/// <summary>
/// Добавление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
TransportTypeViewModel? Insert(TransportTypeBindingModel model);
/// <summary>
/// Редактирование элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
TransportTypeViewModel? Update(TransportTypeBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
TransportTypeViewModel? Delete(TransportTypeBindingModel model);
/// <summary>
/// Удаление элемента
/// </summary>
/// <returns></returns>
TransportTypeViewModel? Delete();
/// <summary>
/// Удаление всех элементов
/// </summary>
/// <returns></returns>
int Clear();
}
}

View File

@ -0,0 +1,45 @@
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.ViewModels
{
/// <summary>
/// Модель для передачи данных пользователю
/// для отображения для маршрутов
/// </summary>
public class RouteViewModel : IRouteModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Название маршрута
/// </summary>
[DisplayName("Название маршрута")]
public string RouteNumber { get; set; } = string.Empty;
/// <summary>
/// Стоимость проезда
/// </summary>
[DisplayName("Стоимость проезда")]
public int Fare { get; }
/// <summary>
/// Идентификатор транспорта
/// </summary>
public int TransportId { get; set; }
/// <summary>
/// Коллекция остановок маршрута
/// </summary>
public Dictionary<int, (IStopModel, int)> RouteStops
{ get; set; } = new();
}
}

View File

@ -0,0 +1,47 @@
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.ViewModels
{
public class ScheduleViewModel : IScheduleModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Время отправления
/// </summary>
[DisplayName("Время отправления")]
public DateTime StartTime { get; set; } = DateTime.MinValue;
/// <summary>
/// Время прибытия
/// </summary>
[DisplayName("Время прибытия")]
public DateTime EndTime { get; set; } = DateTime.MinValue;
/// <summary>
/// Периодичность движения транспорта
/// </summary>
[DisplayName("Периодичность движения транспорта")]
public DateTime TrafficInterval { get; set; } = DateTime.MinValue;
/// <summary>
/// Идентификатор маршрута
/// </summary>
public int RouteId { get; set; }
/// <summary>
/// Название маршрута
/// </summary>
[DisplayName("Маршрут")]
public string RouteNumber { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,24 @@
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.ViewModels
{
public class StopViewModel : IStopModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Название остановки
/// </summary>
[DisplayName("Название остановки")]
public string Name { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,31 @@
using RouteDirectoryDataModels.Enums;
using RouteDirectoryDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RouteDirectoryContracts.ViewModels
{
public class TransportTypeViewModel : ITransportModel
{
/// <summary>
/// Идентификатор
/// </summary>
public int Id { get; set; }
/// <summary>
/// Тип транспортного средства
/// </summary>
[DisplayName("Тип транспорта")]
public TransportType Type { get; set; } = TransportType.Автобус;
/// <summary>
/// Вместимость (количество пассажиров)
/// </summary>
[DisplayName("Вместимость")]
public int Capacity { get; set; }
}
}