2024-05-13 02:01:32 +04:00
|
|
|
|
using AircraftPlantContracts.Attributes;
|
|
|
|
|
using AircraftPlantDataModels.Models;
|
2024-02-21 01:42:28 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AircraftPlantContracts.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Модель для передачи данных пользователю
|
|
|
|
|
/// для отображения для изделий
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class PlaneViewModel : IPlaneModel
|
|
|
|
|
{
|
2024-05-13 02:01:32 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Идентификатор
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column(visible: false)]
|
|
|
|
|
public int Id { get; set; }
|
2024-02-21 01:42:28 +04:00
|
|
|
|
|
2024-05-13 02:01:32 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Название изделия
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column(title: "Название изделия", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
|
|
|
|
public string PlaneName { get; set; } = string.Empty;
|
2024-02-21 01:42:28 +04:00
|
|
|
|
|
2024-05-13 02:01:32 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Стоимость изделия
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column(title: "Цена", width: 150)]
|
|
|
|
|
public double Price { get; set; }
|
2024-02-21 01:42:28 +04:00
|
|
|
|
|
2024-05-13 02:01:32 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Коллекция компонентов изделия
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Column(visible: false)]
|
|
|
|
|
public Dictionary<int, (IComponentModel, int)> PlaneComponents
|
2024-02-21 01:42:28 +04:00
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
set;
|
|
|
|
|
} = new();
|
|
|
|
|
}
|
|
|
|
|
}
|