mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 09:33:13 +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
61 lines
2.8 KiB
C#
61 lines
2.8 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using static System.Runtime.InteropServices.JavaScript.JSType;
|
|
|
|
namespace Data.SeaHavenIndustries
|
|
{
|
|
public class WorkOrder : FullAuditEntity
|
|
{
|
|
public string? InternalWONumber { get; set; }
|
|
public string? ExternalWorkOrderId { get; set; }
|
|
public string? WorkerOrderNumber { get; set; }
|
|
public string? WorkerOrderTitle { get; set; }
|
|
public string? Description { get; set; }
|
|
public string? Customer { get; set; }
|
|
public string? SiteCode { get; set; }
|
|
public string? Building { get; set; }
|
|
public string? Severity { get; set; }
|
|
public DateTime? DateReported { get; set; }
|
|
public DateTime? ScheduledStart { get; set; }
|
|
public string? SourceEmailS3Key { get; set; }
|
|
public string? Problem { get; set; }
|
|
public string? Trade { get; set; }
|
|
public string? SubTrade { get; set; }
|
|
public decimal? VendorNTE { get; set; }
|
|
public DateTime? ScheduledDate { get; set; }
|
|
public DateTime? CompletedDate { get; set; }
|
|
public string? Source { get; set; }
|
|
public bool? istemplate { get; set; }
|
|
public string? PO { get; set; }
|
|
public string? TT { get; set; }
|
|
//public int? ContactId { get; set; }
|
|
//[ForeignKey(nameof(ContactId))]
|
|
//public virtual Contacts? POC { get; set; }
|
|
public string? AssignTo { get; set; }
|
|
[ForeignKey(nameof(AssignTo))]
|
|
public virtual ApplicationUser? AssignToUser { get; set; }
|
|
public DateTime? DueDate { get; set; }
|
|
public string? Priority { get; set; }
|
|
public string? Status { get; set; }
|
|
public int? LocationId { get; set; }
|
|
[ForeignKey(nameof(LocationId))]
|
|
public virtual Locations? Locations { get; set; }
|
|
//public int? CategoryId { get; set; }
|
|
//[ForeignKey(nameof(CategoryId))]
|
|
//public virtual Category? Category { get; set; }
|
|
public string? Attachments { get; set; }
|
|
public string? BeforPhotoIssue { get; set; }
|
|
public string? BeforPhotoAttachment { get; set; }
|
|
public string? AfterPhotoIssue { get; set; }
|
|
public string? AfterPhotoAttachment { get; set; }
|
|
public string? SignOffName { get; set; }
|
|
public string? SignOffAttachment { get; set; }
|
|
public string? SignOffSignature { get; set; }
|
|
public ICollection<Comments>? Comments { get; set; }
|
|
public ICollection<Quotes>? Quotes { get; set; }
|
|
public ICollection<WorkOrderContacts>? WorkOrderContacts { get; set; }
|
|
public ICollection<WorkOrderAttachments>? workOrderAttachments { get; set; }
|
|
public ICollection<WorkOrderCategories>? WorkOrderCategories { get; set; }
|
|
public ICollection<Dispatch>? Dispatches { get; set; }
|
|
}
|
|
}
|