Создание Binding-моделей

This commit is contained in:
Мк Игорь 2023-04-01 18:52:20 +04:00
parent d30f8ee9de
commit d4e22c9915
9 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,13 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class CustomerBindingModel : ICustomerModel
{
public int Id { get; set; }
public string Login { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Surname { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,13 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class ItemBindingModel : IItemModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public int Count { get; set; }
public int WorkerId { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class ItemForRepairBindingModel : IItemForRepairModel
{
public int Id { get; set; }
public int Count { get; set; }
public int ItemId { get; set; }
public int RepairRequestId { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class RepairRequestBindingModel : IRepairRequestModel
{
public int Id { get; set; }
public DateTime DateCreated { get; set; } = DateTime.Now;
public int VehicleId { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class VehicleBindingModel : IVehicleModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string? Plate { get; set; }
public string? VIN { get; set; }
public int CustomerId { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class WorkBindingModel : IWorkModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public decimal Duration { get; set; }
public int WorkerId { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class WorkInRequestBindingModel : IWorkInRequestModel
{
public int Id { get; set; }
public int Count { get; set; }
public decimal Cost { get; set; }
public int RepairRequestId { get; set; }
public int WorkId { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class WorkPaymentBindingModel : IWorkPaymentModel
{
public int Id { get; set; }
public DateTime DatePayment { get; set; }
public decimal Sum { get; set; }
public int WorkInRequestId { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using CarServiceContracts.Models;
namespace CarServiceContracts.BindingModels
{
public class WorkerBindingModel : IWorkerModel
{
public int Id { get; set; }
public string Login { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Surname { get; set; } = string.Empty;
}
}