47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using AircraftPlantContracts.Attributes;
|
|
using AircraftPlantDataModels.Models;
|
|
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
|
|
{
|
|
/// <summary>
|
|
/// Идентификатор
|
|
/// </summary>
|
|
[Column(visible: false)]
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Название изделия
|
|
/// </summary>
|
|
[Column(title: "Название изделия", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
|
public string PlaneName { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Стоимость изделия
|
|
/// </summary>
|
|
[Column(title: "Цена", width: 150)]
|
|
public double Price { get; set; }
|
|
|
|
/// <summary>
|
|
/// Коллекция компонентов изделия
|
|
/// </summary>
|
|
[Column(visible: false)]
|
|
public Dictionary<int, (IComponentModel, int)> PlaneComponents
|
|
{
|
|
get;
|
|
set;
|
|
} = new();
|
|
}
|
|
}
|