Upload files to 'ShipyardContracts/ViewModels'

This commit is contained in:
Ivan_Starostin 2024-04-27 18:26:46 +04:00
parent 8511b1f207
commit 92618a72a6
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,13 @@
using ShipyardDataModels.Models;
using System.ComponentModel;
namespace ShipyardContracts.ViewModels
{
public class ComponentViewModel : IComponentModel
{
public int Id { get; set; }
[DisplayName("Название компонента")]
public string ComponentName { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,24 @@
using ShipyardDataModels.Enums;
using ShipyardDataModels.Models;
using System.ComponentModel;
namespace ShipyardContracts.ViewModels
{
public class OrderViewModel : IOrderModel
{
[DisplayName("Номер")]
public int Id { get; set; }
public int ShipId { get; set; }
[DisplayName("корабль")]
public string ShipName { get; set; } = string.Empty;
[DisplayName("Количество")]
public int Count { get; set; }
[DisplayName("Сумма")]
public double Sum { get; set; }
[DisplayName("Статус")]
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
[DisplayName("Дата создания")]
public DateTime DateCreate { get; set; } = DateTime.Now;
[DisplayName("Дата выполнения")]
public DateTime? DateImplement { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using ShipyardDataModels.Models;
using System.ComponentModel;
namespace ShipyardContracts.ViewModels
{
public class ShipViewModel : IShipModel
{
public int Id { get; set; }
[DisplayName("Название изделия")]
public string ShipName { get; set; } = string.Empty;
[DisplayName("Цена")]
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> ShipComponents
{
get;
set;
} = new();
}
}