mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 20:03:11 +00:00
Brings in dev's Phase 5 (PR #17) + vendor PRs (#25/#28/#29) atop the Phase 6/7 + flagColor base (PR #22). Preserves dev Phase 1-5 behavior and PR #22 Phase 6/7 + flagColor behavior. Conflict resolutions (16 files): - Migrations Phase4_SearchIndexes/.Designer + Phase5_DomainEvents/.Designer: take dev (Phase4 incl. SQL Server SiteCode/InternalWONumber index-compat shrink fix; Phase5 identical). ModelSnapshot union: Vendor CompanyId index + Phase7 ServiceNotes/ExternalWorkOrderId index. - ApplicationDbContext: keep dev SiteCode/InternalWONumber MaxLength (Phase1-5 + unguarded model test) + HEAD CompletionDocTemplate/ExternalWorkOrderId. - WorkOrderAuditService: unify on dev async staging API; convert Phase6 CompletionService 2 call sites to await StageFieldChangedAsync (drops HEAD sync duplicate; only callers, no test refs). - Hosted services: take HEAD (retry-on-failure, coherent with Phase7 WorkOrderJobRunStateAccessor/OpsHealth). Program.cs keeps dev vendor DI (ClamAV/VendorDocumentScanWorker/ArgumentExceptionFilter) + HEAD Phase7. - WorkOrderController: keep HEAD Phase6/7 service params + dev doc comment. - VendorController/WorkOrderBoardCreateService/QueryFilters/appsettings: union / dev-correct. - WorkOrderBoardUpdateServiceTests: union of HEAD (Phase6/7+flagColor) and dev (Phase1-5) test methods. Verified WorkOrderType.Other (enum 99) is a legit category, not an overdue sentinel; overdue uses dedicated OperationalFlags.PastDue + IsPastDue, and 'Overdue' is rejected as a WorkOrderType (no PR #23 import needed). Removed dev duplicate Api.Options.WorkOrderJobRunState (HEAD defines it in Services.Implementation alongside the Accessor; Services cannot reference Api).
53 lines
2.3 KiB
C#
53 lines
2.3 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
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? DispatchNumber { get; set; }
|
|
public string? PONumber { get; set; }
|
|
public decimal? NTEAmount { get; set; }
|
|
public string? Description { get; set; }
|
|
public string? Status { get; set; }
|
|
public DateTime? ScheduledDate { get; set; }
|
|
public DateTime? EstimatedArrivalAt { get; set; }
|
|
public bool EtaManualOverride { get; set; }
|
|
public string InvoiceStatus { get; set; } = "Not Submitted";
|
|
public string PaymentStatus { get; set; } = "Unavailable";
|
|
public string? InvoiceNumber { get; set; }
|
|
public DateTime? CommercialStatusUpdatedAt { get; set; }
|
|
public DateTime? CompletedDate { get; set; }
|
|
public DateTime? DispatchedAt { get; set; }
|
|
public DateTime? AcknowledgedAt { get; set; }
|
|
public bool EmailSent { get; set; }
|
|
public string? ReplyToAddress { get; set; }
|
|
public string? AcceptToken { get; set; }
|
|
public string? VerifiedBy { get; set; }
|
|
public DateTime? VerifiedAt { get; set; }
|
|
|
|
/// <summary>Tech/crew phone for this dispatch (overrides Vendor.Phone on board).</summary>
|
|
[MaxLength(50)]
|
|
public string? TechPhone { get; set; }
|
|
/// <summary>Instructions for the vendor for this appointment/dispatch.</summary>
|
|
[MaxLength(2000)]
|
|
public string? VendorNotes { get; set; }
|
|
|
|
[Timestamp]
|
|
public byte[]? RowVersion { get; set; }
|
|
|
|
public ICollection<Comments>? Comments { get; set; }
|
|
public ICollection<DispatchWorkOrder>? DispatchWorkOrders { get; set; }
|
|
public ICollection<DispatchChecklistItem>? ChecklistItems { get; set; }
|
|
public ICollection<DispatchSignoff>? Signoffs { get; set; }
|
|
public ICollection<VendorCompletionDocument>? CompletionDocuments { get; set; }
|
|
}
|
|
}
|