mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 23:33:10 +00:00
- DispatchWorkOrder junction table for 1:N dispatch-to-WO relationship - Make Dispatch.WorkOrderId nullable (backward compat) - Add AcceptToken and AcknowledgedAt to Dispatch model - Dispatch_DTO accepts WorkOrderIds array - DispatchToVendor creates junction rows, email lists all WOs in table - GetDispatches queries both junction table and direct FK - GetDispatchById includes workOrders list from junction table - Migration with DispatchWorkOrder table
15 lines
460 B
C#
15 lines
460 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Data.SeaHavenIndustries
|
|
{
|
|
public class DispatchWorkOrder
|
|
{
|
|
public int Id { get; set; }
|
|
public int DispatchId { get; set; }
|
|
[ForeignKey(nameof(DispatchId))]
|
|
public virtual Dispatch? Dispatch { get; set; }
|
|
public int WorkOrderId { get; set; }
|
|
[ForeignKey(nameof(WorkOrderId))]
|
|
public virtual WorkOrder? WorkOrder { get; set; }
|
|
}
|
|
}
|