Fixed all relationship and write errors in all entities
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(WarehouseId))]
|
||||
public class WarehouseProduct
|
||||
{
|
||||
[Key] public int Quantity { get; set; }
|
||||
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public Product? Product { get; set; }
|
||||
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int WarehouseId { get; set; }
|
||||
[Required] public Warehouse? Warehouse { get; set; }
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
|
||||
[Required] public int Quantity { get; set; }
|
||||
}
|
Reference in New Issue
Block a user