mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 06:03:12 +00:00
- Create Vendor model with company info, trade specialties, active flag - Create Dispatch model (doubles as Vendor PO) with PO number, NTE, status, reply-to address - VendorController: CRUD, paginated list, dropdown endpoint with trade filtering - DispatchToVendor endpoint: multi-vendor dispatch, auto-generated PO numbers (VPO-00001), HTML email with full WO details via SendGrid, reply-to wo-{number}@int.seahaven.com - GetDispatches endpoint for listing dispatches by WO - Include dispatches in GetWorkorderById response - SendMessage.SendDispatchEmail with reply-to support - Audit log entry for each dispatch
23 lines
762 B
C#
23 lines
762 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Data.SeaHavenIndustries
|
|
{
|
|
public class Dispatch : FullAuditEntity
|
|
{
|
|
public int WorkOrderId { get; set; }
|
|
[ForeignKey(nameof(WorkOrderId))]
|
|
public virtual WorkOrder? WorkOrder { get; set; }
|
|
|
|
public int VendorId { get; set; }
|
|
[ForeignKey(nameof(VendorId))]
|
|
public virtual Vendor? Vendor { get; set; }
|
|
|
|
public string? PONumber { get; set; }
|
|
public decimal? NTEAmount { get; set; }
|
|
public string? Description { get; set; }
|
|
public string? Status { get; set; }
|
|
public DateTime? DispatchedAt { get; set; }
|
|
public bool EmailSent { get; set; }
|
|
public string? ReplyToAddress { get; set; }
|
|
}
|
|
}
|