diff --git a/ShipyardContracts/ViewModels/ComponentViewModel.cs b/ShipyardContracts/ViewModels/ComponentViewModel.cs new file mode 100644 index 0000000..f2b36f6 --- /dev/null +++ b/ShipyardContracts/ViewModels/ComponentViewModel.cs @@ -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; } + } +} diff --git a/ShipyardContracts/ViewModels/OrderViewModel.cs b/ShipyardContracts/ViewModels/OrderViewModel.cs new file mode 100644 index 0000000..8dbb802 --- /dev/null +++ b/ShipyardContracts/ViewModels/OrderViewModel.cs @@ -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; } + } +} diff --git a/ShipyardContracts/ViewModels/ShipViewModel.cs b/ShipyardContracts/ViewModels/ShipViewModel.cs new file mode 100644 index 0000000..4bbfc6e --- /dev/null +++ b/ShipyardContracts/ViewModels/ShipViewModel.cs @@ -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 ShipComponents + { + get; + set; + } = new(); + } +}