Создание прототипов моделей

This commit is contained in:
Мк Игорь 2023-04-01 18:25:22 +04:00
parent d22becefc8
commit d30f8ee9de
12 changed files with 255 additions and 0 deletions

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarServiceView", "CarServiceView\CarServiceView.csproj", "{C262D7D2-9DBD-4E9E-B64A-540100480F23}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarServiceContracts", "CarServiceContracts\CarServiceContracts.csproj", "{98900EAA-0514-4A6B-B0D9-E2B21A089977}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -15,6 +17,10 @@ Global
{C262D7D2-9DBD-4E9E-B64A-540100480F23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C262D7D2-9DBD-4E9E-B64A-540100480F23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C262D7D2-9DBD-4E9E-B64A-540100480F23}.Release|Any CPU.Build.0 = Release|Any CPU
{98900EAA-0514-4A6B-B0D9-E2B21A089977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{98900EAA-0514-4A6B-B0D9-E2B21A089977}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98900EAA-0514-4A6B-B0D9-E2B21A089977}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98900EAA-0514-4A6B-B0D9-E2B21A089977}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,13 @@
namespace CarServiceContracts.Id
{
/// <summary>
/// Id каждой сущности
/// </summary>
public interface IId
{
/// <summary>
/// Id
/// </summary>
int Id { get; }
}
}

View File

@ -0,0 +1,27 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Клиент
/// </summary>
public interface ICustomerModel : IId
{
/// <summary>
/// Логин
/// </summary>
string Login { get; }
/// <summary>
/// Пароль
/// </summary>
string Password { get; }
/// <summary>
/// Имя
/// </summary>
string Name { get; }
/// <summary>
/// Фамилия
/// </summary>
string Surname { get; }
}
}

View File

@ -0,0 +1,23 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Затрата на ремонт
/// </summary>
public interface IItemForRepairModel : IId
{
/// <summary>
/// Количество
/// </summary>
int Count { get; }
/// <summary>
/// Id статьм затрат
/// </summary>
int ItemId { get; }
/// <summary>
/// Id заявки на ремонт
/// </summary>
int RepairRequestId { get; }
}
}

View File

@ -0,0 +1,27 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Статья затрат
/// </summary>
public interface IItemModel : IId
{
/// <summary>
/// Наименование
/// </summary>
string Name { get; }
/// <summary>
/// Цена
/// </summary>
decimal Price { get; }
/// <summary>
/// Количество
/// </summary>
int Count { get; }
/// <summary>
/// Id сотрудника
/// </summary>
int WorkerId { get; }
}
}

View File

@ -0,0 +1,19 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Заявка на ремонт
/// </summary>
public interface IRepairRequestModel : IId
{
/// <summary>
/// Дата создания
/// </summary>
DateTime DateCreated { get; }
/// <summary>
/// Id транспортного средства
/// </summary>
int VehicleId { get; }
}
}

View File

@ -0,0 +1,27 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Транспортное средство
/// </summary>
public interface IVehicleModel : IId
{
/// <summary>
/// Наименование
/// </summary>
string Name { get; }
/// <summary>
/// Гос. номер
/// </summary>
string? Plate { get; }
/// <summary>
/// ВИН-номер
/// </summary>
string? VIN { get; }
/// <summary>
/// Id клиента
/// </summary>
int CustomerId { get; }
}
}

View File

@ -0,0 +1,27 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Работа в заявке
/// </summary>
public interface IWorkInRequestModel : IId
{
/// <summary>
/// Количество работ
/// </summary>
int Count { get; }
/// <summary>
/// Стоимость работы
/// </summary>
decimal Cost { get; }
/// <summary>
/// Id заявки на ремонт
/// </summary>
int RepairRequestId { get; }
/// <summary>
/// Id работы
/// </summary>
int WorkId { get; }
}
}

View File

@ -0,0 +1,27 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Работа
/// </summary>
public interface IWorkModel : IId
{
/// <summary>
/// Наименование
/// </summary>
string Name { get; }
/// <summary>
/// Стоимость работы
/// </summary>
decimal Price { get; }
/// <summary>
/// Длительность
/// </summary>
decimal Duration { get; }
/// <summary>
/// Id сотрудника
/// </summary>
int WorkerId { get; }
}
}

View File

@ -0,0 +1,23 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Оплата работы
/// </summary>
public interface IWorkPaymentModel : IId
{
/// <summary>
/// Дата оплаты
/// </summary>
DateTime DatePayment { get; }
/// <summary>
/// Сумма
/// </summary>
decimal Sum { get; }
/// <summary>
/// Id работы в заявке
/// </summary>
int WorkInRequestId { get; }
}
}

View File

@ -0,0 +1,27 @@
using CarServiceContracts.Id;
namespace CarServiceContracts.Models
{
/// <summary>
/// Сотрудник
/// </summary>
public interface IWorkerModel : IId
{
/// <summary>
/// Логин
/// </summary>
string Login { get; }
/// <summary>
/// Пароль
/// </summary>
string Password { get; }
/// <summary>
/// Имя
/// </summary>
string Name { get; }
/// <summary>
/// Фамилия
/// </summary>
string Surname { get; }
}
}