Upload files to 'STOContracts/ViewModels'

This commit is contained in:
Ivan_Starostin 2024-05-01 14:28:44 +04:00
parent b276ee5434
commit 9d88de1d32
5 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,19 @@
using STODataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace STOContracts.ViewModels
{
public class CarPartViewModel: ICarPartModel
{
public int Id { get; set; }
[DisplayName("название запчасти")]
public string CarPartName { get; set; } = string.Empty;
[DisplayName("цена")]
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,28 @@
using STODataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace STOContracts.ViewModels
{
public class CarViewModel : ICarModel
{
public int Id { get; set; }
[DisplayName("Номер")]
public string CarNumber { get; set; }
[DisplayName("Марка")]
public string CarBrand { get; set; } = string.Empty;
[DisplayName("Модель")]
public string CarModel { get; set; } = string.Empty;
[DisplayName("год производства")]
public DateTime Year { get; set; } = DateTime.MinValue;
public Dictionary<int, (ITechnicalWorkModel, int)> CarTechnicalWorks { get; set; } = new();
public Dictionary<int, (ICarPartModel, int)> CarParts { get; set; } = new();
public int ClientId { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using STODataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace STOContracts.ViewModels
{
public class ClientViewModel : IClientModel
{
public int Id { get; set; }
[DisplayName("ФИО клиента")]
public string ClientFIO { get; set; } = string.Empty;
[DisplayName("Логин (эл. почта)")]
public string Email { get; set; } = string.Empty;
[DisplayName("Пароль")]
public string Password { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,19 @@
using STODataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace STOContracts.ViewModels
{
public class ServiceViewModel : IServiceModel
{
public int Id { get; set; }
[DisplayName("Название сервиса")]
public string Name { get; set; } = string.Empty;
public int ClientId { get; set; }
public int CarId { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using STODataModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace STOContracts.ViewModels
{
public class TechnicalWorkViewModel: ITechnicalWorkModel
{
public int Id { get; set; }
[DisplayName("Название ТО")]
public string Name { get; set; } = string.Empty;
[DisplayName("Описание ТО")]
public string Description { get; set; } = string.Empty;
[DisplayName("дата ТО")]
public DateTime Date { get; set; } = DateTime.MinValue;
public Dictionary<int, (IWorkModel, int)> TechnicalworkWorks { get; set; } = new();
}
}