Тотальный слив сущностей #9

Merged
Marselchii merged 6 commits from sagirovs_part into main 2024-04-28 14:59:32 +04:00
9 changed files with 177 additions and 4 deletions
Showing only changes of commit 6653d056d3 - Show all commits

View File

@ -0,0 +1,20 @@
using CarCenterContracts.BindingModels;
using CarCenterContracts.SearchModels;
using CarCenterContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.BusinessLogicsContracts
{
public interface IOrderLogic
{
List<OrderViewModel>? ReadList(OrderSearchModel? model);
OrderViewModel? ReadElement(OrderSearchModel model);
bool Create(OrderBindingModel model);
bool Update(OrderBindingModel model);
bool Delete(OrderBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using CarCenterContracts.BindingModels;
using CarCenterContracts.SearchModels;
using CarCenterContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.BusinessLogicsContracts
{
public interface IPresaleLogic
{
List<PresaleViewModel>? ReadList(PresaleSearchModel? model);
PresaleViewModel? ReadElement(PresaleSearchModel model);
bool Create(PresaleBindingModel model);
bool Update(PresaleBindingModel model);
bool Delete(PresaleBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using CarCenterContracts.BindingModels;
using CarCenterContracts.SearchModels;
using CarCenterContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.BusinessLogicsContracts
{
public interface IRequestLogic
{
List<RequestViewModel>? ReadList(RequestSearchModel? model);
RequestViewModel? ReadElement(RequestSearchModel model);
bool Create(RequestBindingModel model);
bool Update(RequestBindingModel model);
bool Delete(RequestBindingModel model);
}
}

View File

@ -0,0 +1,20 @@
using CarCenterContracts.BindingModels;
using CarCenterContracts.SearchModels;
using CarCenterContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarCenterContracts.BusinessLogicsContracts
{
public interface IWorkerLogic
{
List<WorkerViewModel>? ReadList(WorkerSearchModel? model);
WorkerViewModel? ReadElement(WorkerSearchModel model);
bool Create(WorkerBindingModel model);
bool Update(WorkerBindingModel model);
bool Delete(WorkerBindingModel model);
}
}

View File

@ -6,10 +6,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="BusinessLogicsContracts\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CarCenterDataModels\CarCenterDataModels.csproj" />
</ItemGroup>

View File

@ -0,0 +1,26 @@
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 OrderViewModel : IOrderModel
{
public int Id { get; set; }
[DisplayName("Тип оплаты")]
public PaymentType PaymentType { get; set; } = PaymentType.Неизвестно;
[DisplayName("Статус оплаты")]
public PaymentStatus PaymentStatus { get; set; } = PaymentStatus.Неизвестно;
[DisplayName("ФИО покупателя")]
public string BuyerFCS { get; set; } = string.Empty;
[DisplayName("Дата оплаты")]
public DateTime PaymentDate { get; set; }
[DisplayName("Сумма")]
public double Sum { get; set; }
}
}

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 PresaleViewModel : IPresaleModel
{
public int Id { get; set; }
[DisplayName("Статус работы")]
public PresaleStatus PresaleStatus { get; set; } = PresaleStatus.Неизвестно;
[DisplayName("Описание")]
public string Description { get; set; } = string.Empty;
[DisplayName("Выполнить до")]
public DateTime DueTill { get; set; }
[DisplayName("Цена")]
public double Price { get; set; }
}
}

View File

@ -0,0 +1,20 @@
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 RequestViewModel : IRequestModel
{
public int Id { get; set; }
[DisplayName("Описание")]
public string Description { get; set; } = string.Empty;
[DisplayName("Тип пожелания")]
public RequestTypes RequestType { get; set; } = RequestTypes.Неизвестно;
}
}

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 WorkerViewModel : IWorkerModel
{
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; }
}
}