This commit is contained in:
Zakharov_Rostislav 2024-05-03 10:27:07 +04:00
parent c41c5a43c7
commit af78799f28
8 changed files with 141 additions and 5 deletions

View File

@ -12,5 +12,7 @@ namespace CarShowroomContracts.AbstractModels
int Cost { get; }
int ClientId { get; }
int EmployeeId { get; }
}
List<int> CarIds { get; }
List<int> ServiseIds { get; }
}
}

View File

@ -6,8 +6,4 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Dtos\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,24 @@
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class CarDto : ICar
{
public int Id { get; set; }
public string Color { get; set; }
public DateTime RealiseDate { get; set; }
public int ModelId { get; set; }
public CarDto(ICar model)
{
Id = model.Id;
Color = model.Color;
RealiseDate = model.RealiseDate;
ModelId = model.ModelId;
}
}
}

View File

@ -0,0 +1,24 @@
using CarShowroomDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class ClientDto : IClient
{
public int Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public ClientDto(IClient model)
{
Id = model.Id;
Name = model.Name;
Email = model.Email;
Password = model.Password;
}
}
}

View File

@ -0,0 +1,24 @@
using CarShowroomDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class EmployeeDto : IEmployee
{
public int Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public EmployeeDto(IEmployee model)
{
Id = model.Id;
Name = model.Name;
Email = model.Email;
Password = model.Password;
}
}
}

View File

@ -0,0 +1,20 @@
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class MakeDto : IMake
{
public int Id { get; set; }
public string Name { get; set; }
public MakeDto(IMake model)
{
Id = model.Id;
Name = model.Name;
}
}
}

View File

@ -0,0 +1,24 @@
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class ModeDto : IModel
{
public int Id { get; set; }
public string Name { get; set; }
public int Price { get; set; }
public int MakeId { get; set; }
public ModeDto(IModel model)
{
Id = model.Id;
Name = model.Name;
Price = model.Price;
MakeId = model.MakeId;
}
}
}

View File

@ -0,0 +1,22 @@
using CarShowroomContracts.AbstractModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarShowroomContracts.Dtos
{
public class ServiceDto : IService
{
public int Id { get; set; }
public string Name { get; set; }
public int Cost { get; set; }
public ServiceDto(IService model)
{
Id = model.Id;
Name = model.Name;
Cost = model.Cost;
}
}
}