binding
This commit is contained in:
parent
0c13fd92a4
commit
1f61f8d67d
11
ShipyardContracts/BindingModels/ComponentBindingModel.cs
Normal file
11
ShipyardContracts/BindingModels/ComponentBindingModel.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using ShipyardDataModels.Models;
|
||||||
|
|
||||||
|
namespace ShipyardContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ComponentBindingModel : IComponentModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string ComponentName { get; set; } = string.Empty;
|
||||||
|
public double Cost { get; set; }
|
||||||
|
}
|
||||||
|
}
|
15
ShipyardContracts/BindingModels/OrderBindingModel.cs
Normal file
15
ShipyardContracts/BindingModels/OrderBindingModel.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using ShipyardDataModels.Enums;
|
||||||
|
using ShipyardDataModels.Models;
|
||||||
|
namespace ShipyardContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class OrderBindingModel : IOrderModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int ShipId { get; set; }
|
||||||
|
public int Count { get; set; }
|
||||||
|
public double Sum { get; set; }
|
||||||
|
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||||
|
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||||
|
public DateTime? DateImplement { get; set; }
|
||||||
|
}
|
||||||
|
}
|
17
ShipyardContracts/BindingModels/ShipBindingModel.cs
Normal file
17
ShipyardContracts/BindingModels/ShipBindingModel.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using ShipyardDataModels.Models;
|
||||||
|
|
||||||
|
namespace ShipyardContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ShipBindingModel : IShipModel
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string ShipName { get; set; } = string.Empty;
|
||||||
|
public double Price { get; set; }
|
||||||
|
public Dictionary<int, (IComponentModel, int)> ShipComponents
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = new();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user