15 lines
439 B
C#
15 lines
439 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PF3.Models;
|
|
|
|
[PrimaryKey(nameof(ProductId), nameof(WarehouseId))]
|
|
public class WarehouseProduct
|
|
{
|
|
[Required] public int ProductId { get; set; }
|
|
public Product? Product { get; set; }
|
|
[Required] public int WarehouseId { get; set; }
|
|
public Warehouse? Warehouse { get; set; }
|
|
|
|
[Required] public int Quantity { get; set; }
|
|
} |