Reports init, changed 1 relation
This commit is contained in:
@@ -5,6 +5,7 @@ using ComputerShopDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -19,6 +20,9 @@ namespace ComputerShopDatabaseImplement.Models
|
||||
public int Id { get; set; }
|
||||
public EquipmentReceivingStatus Status { get; private set; } = EquipmentReceivingStatus.Неизвестен;
|
||||
|
||||
[ForeignKey("ReceivingId")]
|
||||
public List<Supply> Supplies { get; set; } = new();
|
||||
|
||||
public static EquipmentReceiving? Create(EquipmentReceivingBindingModel? model)
|
||||
{
|
||||
if (model == null)
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace ComputerShopDatabaseImplement.Models
|
||||
|
||||
public int OrderId { get; set; }
|
||||
|
||||
public int ReceivingId { get; set; }
|
||||
private Dictionary<int, (IOrderModel, int)>? _supplyOrders =
|
||||
null;
|
||||
[NotMapped]
|
||||
@@ -45,9 +44,7 @@ namespace ComputerShopDatabaseImplement.Models
|
||||
[ForeignKey("SupplyId")]
|
||||
public virtual List<SupplyOrder> Orders { get; set; } = new();
|
||||
[ForeignKey("SupplyId")]
|
||||
public virtual List<EquipmentReceiving> Receivings { get; set; } = new();
|
||||
[ForeignKey("SupplyId")]
|
||||
public virtual List<ComponentSupply> Supplies { get; set; } = new();
|
||||
public virtual List<ComponentSupply> ComponentSupplies { get; set; } = new();
|
||||
|
||||
public static Supply Create(ComputerShopDatabase context, SupplyBindingModel model)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user