Files
ERP_Distribution/Distribution/Models/GoodsReceipt.cs

27 lines
952 B
C#

using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
public class GoodsReceipt : Template
{
public Guid FK_PurchaseOrderId { get; set; }
[ForeignKey("FK_PurchaseOrderId")]
public PurchaseOrder PurchaseOrder { get; set; }
public Guid FK_ReceivedByUserId { get; set; }
/// <summary>
/// Warehouse the accepted quantities are received into. Not listed as a field in
/// docs/15_procurement.md's GoodsReceipt table, but required to write StockBalance/
/// StockMovement rows (both keyed by LocationId+LocationType) for the accepted quantities.
/// </summary>
public Guid FK_WarehouseId { get; set; }
[ForeignKey("FK_WarehouseId")]
public Warehouse Warehouse { get; set; }
public DateTime ReceivedAt { get; set; } = DateTime.Now;
public ICollection<GoodsReceiptItem> Items { get; set; } = [];
}
}