From d30f8ee9de0c4c20617a19bcebd29fff8d15a54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=BA=20=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Sat, 1 Apr 2023 18:25:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D1=82=D0=BE=D1=82=D0=B8=D0=BF=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CarService/CarService.sln | 6 +++++ .../CarServiceContracts.csproj | 9 +++++++ CarService/CarServiceContracts/Id/IId.cs | 13 +++++++++ .../Models/ICustomerModel.cs | 27 +++++++++++++++++++ .../Models/IItemForRepairModel.cs | 23 ++++++++++++++++ .../CarServiceContracts/Models/IItemModel.cs | 27 +++++++++++++++++++ .../Models/IRepairRequestModel.cs | 19 +++++++++++++ .../Models/IVehicleModel.cs | 27 +++++++++++++++++++ .../Models/IWorkInRequestModel.cs | 27 +++++++++++++++++++ .../CarServiceContracts/Models/IWorkModel.cs | 27 +++++++++++++++++++ .../Models/IWorkPaymentModel.cs | 23 ++++++++++++++++ .../Models/IWorkerModel.cs | 27 +++++++++++++++++++ 12 files changed, 255 insertions(+) create mode 100644 CarService/CarServiceContracts/CarServiceContracts.csproj create mode 100644 CarService/CarServiceContracts/Id/IId.cs create mode 100644 CarService/CarServiceContracts/Models/ICustomerModel.cs create mode 100644 CarService/CarServiceContracts/Models/IItemForRepairModel.cs create mode 100644 CarService/CarServiceContracts/Models/IItemModel.cs create mode 100644 CarService/CarServiceContracts/Models/IRepairRequestModel.cs create mode 100644 CarService/CarServiceContracts/Models/IVehicleModel.cs create mode 100644 CarService/CarServiceContracts/Models/IWorkInRequestModel.cs create mode 100644 CarService/CarServiceContracts/Models/IWorkModel.cs create mode 100644 CarService/CarServiceContracts/Models/IWorkPaymentModel.cs create mode 100644 CarService/CarServiceContracts/Models/IWorkerModel.cs diff --git a/CarService/CarService.sln b/CarService/CarService.sln index 6c349a7..e15a9e1 100644 --- a/CarService/CarService.sln +++ b/CarService/CarService.sln @@ -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 diff --git a/CarService/CarServiceContracts/CarServiceContracts.csproj b/CarService/CarServiceContracts/CarServiceContracts.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/CarService/CarServiceContracts/CarServiceContracts.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/CarService/CarServiceContracts/Id/IId.cs b/CarService/CarServiceContracts/Id/IId.cs new file mode 100644 index 0000000..cb175a9 --- /dev/null +++ b/CarService/CarServiceContracts/Id/IId.cs @@ -0,0 +1,13 @@ +namespace CarServiceContracts.Id +{ + /// + /// Id каждой сущности + /// + public interface IId + { + /// + /// Id + /// + int Id { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/ICustomerModel.cs b/CarService/CarServiceContracts/Models/ICustomerModel.cs new file mode 100644 index 0000000..173c40b --- /dev/null +++ b/CarService/CarServiceContracts/Models/ICustomerModel.cs @@ -0,0 +1,27 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Клиент + /// + public interface ICustomerModel : IId + { + /// + /// Логин + /// + string Login { get; } + /// + /// Пароль + /// + string Password { get; } + /// + /// Имя + /// + string Name { get; } + /// + /// Фамилия + /// + string Surname { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IItemForRepairModel.cs b/CarService/CarServiceContracts/Models/IItemForRepairModel.cs new file mode 100644 index 0000000..f0956b4 --- /dev/null +++ b/CarService/CarServiceContracts/Models/IItemForRepairModel.cs @@ -0,0 +1,23 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Затрата на ремонт + /// + public interface IItemForRepairModel : IId + { + /// + /// Количество + /// + int Count { get; } + /// + /// Id статьм затрат + /// + int ItemId { get; } + /// + /// Id заявки на ремонт + /// + int RepairRequestId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IItemModel.cs b/CarService/CarServiceContracts/Models/IItemModel.cs new file mode 100644 index 0000000..a14b812 --- /dev/null +++ b/CarService/CarServiceContracts/Models/IItemModel.cs @@ -0,0 +1,27 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Статья затрат + /// + public interface IItemModel : IId + { + /// + /// Наименование + /// + string Name { get; } + /// + /// Цена + /// + decimal Price { get; } + /// + /// Количество + /// + int Count { get; } + /// + /// Id сотрудника + /// + int WorkerId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IRepairRequestModel.cs b/CarService/CarServiceContracts/Models/IRepairRequestModel.cs new file mode 100644 index 0000000..708d0dd --- /dev/null +++ b/CarService/CarServiceContracts/Models/IRepairRequestModel.cs @@ -0,0 +1,19 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Заявка на ремонт + /// + public interface IRepairRequestModel : IId + { + /// + /// Дата создания + /// + DateTime DateCreated { get; } + /// + /// Id транспортного средства + /// + int VehicleId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IVehicleModel.cs b/CarService/CarServiceContracts/Models/IVehicleModel.cs new file mode 100644 index 0000000..c37728d --- /dev/null +++ b/CarService/CarServiceContracts/Models/IVehicleModel.cs @@ -0,0 +1,27 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Транспортное средство + /// + public interface IVehicleModel : IId + { + /// + /// Наименование + /// + string Name { get; } + /// + /// Гос. номер + /// + string? Plate { get; } + /// + /// ВИН-номер + /// + string? VIN { get; } + /// + /// Id клиента + /// + int CustomerId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs b/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs new file mode 100644 index 0000000..226c67a --- /dev/null +++ b/CarService/CarServiceContracts/Models/IWorkInRequestModel.cs @@ -0,0 +1,27 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Работа в заявке + /// + public interface IWorkInRequestModel : IId + { + /// + /// Количество работ + /// + int Count { get; } + /// + /// Стоимость работы + /// + decimal Cost { get; } + /// + /// Id заявки на ремонт + /// + int RepairRequestId { get; } + /// + /// Id работы + /// + int WorkId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IWorkModel.cs b/CarService/CarServiceContracts/Models/IWorkModel.cs new file mode 100644 index 0000000..5f19a5e --- /dev/null +++ b/CarService/CarServiceContracts/Models/IWorkModel.cs @@ -0,0 +1,27 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Работа + /// + public interface IWorkModel : IId + { + /// + /// Наименование + /// + string Name { get; } + /// + /// Стоимость работы + /// + decimal Price { get; } + /// + /// Длительность + /// + decimal Duration { get; } + /// + /// Id сотрудника + /// + int WorkerId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IWorkPaymentModel.cs b/CarService/CarServiceContracts/Models/IWorkPaymentModel.cs new file mode 100644 index 0000000..ceb6a00 --- /dev/null +++ b/CarService/CarServiceContracts/Models/IWorkPaymentModel.cs @@ -0,0 +1,23 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Оплата работы + /// + public interface IWorkPaymentModel : IId + { + /// + /// Дата оплаты + /// + DateTime DatePayment { get; } + /// + /// Сумма + /// + decimal Sum { get; } + /// + /// Id работы в заявке + /// + int WorkInRequestId { get; } + } +} diff --git a/CarService/CarServiceContracts/Models/IWorkerModel.cs b/CarService/CarServiceContracts/Models/IWorkerModel.cs new file mode 100644 index 0000000..aed0d84 --- /dev/null +++ b/CarService/CarServiceContracts/Models/IWorkerModel.cs @@ -0,0 +1,27 @@ +using CarServiceContracts.Id; + +namespace CarServiceContracts.Models +{ + /// + /// Сотрудник + /// + public interface IWorkerModel : IId + { + /// + /// Логин + /// + string Login { get; } + /// + /// Пароль + /// + string Password { get; } + /// + /// Имя + /// + string Name { get; } + /// + /// Фамилия + /// + string Surname { get; } + } +}