mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
260 lines
9.4 KiB
C#
260 lines
9.4 KiB
C#
namespace SeaHaven.Services.DTOs
|
|
{
|
|
public class VendorPortalSession
|
|
{
|
|
public int Id { get; set; }
|
|
public string? CompanyName { get; set; }
|
|
public string? ContactName { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Phone { get; set; }
|
|
}
|
|
|
|
public class VendorDispatchSummaryDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? DispatchNumber { get; set; }
|
|
public string? PONumber { get; set; }
|
|
public string? Status { get; set; }
|
|
public decimal? NTEAmount { get; set; }
|
|
public DateTime? ScheduledDate { get; set; }
|
|
public DateTime? CompletedDate { get; set; }
|
|
public DateTime? DispatchedAt { get; set; }
|
|
public DateTime? AcknowledgedAt { get; set; }
|
|
public string? WorkOrderTitle { get; set; }
|
|
public string? InternalWONumber { get; set; }
|
|
public string? LocationName { get; set; }
|
|
public string? LocationCity { get; set; }
|
|
public string? LocationState { get; set; }
|
|
}
|
|
|
|
public class PortalChecklistItemDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? ItemText { get; set; }
|
|
public bool IsCompleted { get; set; }
|
|
public string? CompletedBy { get; set; }
|
|
public DateTime? CompletedAt { get; set; }
|
|
}
|
|
|
|
public class PortalSignoffDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? SignoffType { get; set; }
|
|
public string? Name { get; set; }
|
|
public string? SignatureMethod { get; set; }
|
|
public DateTime? SignedAt { get; set; }
|
|
}
|
|
|
|
public class PortalUpliftDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public decimal? CurrentNTE { get; set; }
|
|
public decimal RequestedNTE { get; set; }
|
|
public string? VendorReason { get; set; }
|
|
public string? Status { get; set; }
|
|
public int RequiredTier { get; set; }
|
|
public string? RequestedByVendorName { get; set; }
|
|
// False for requests raised from the work order: the portal shows them read-only.
|
|
public bool RaisedByVendor { get; set; }
|
|
public DateTime? RequestedAt { get; set; }
|
|
public DateTime? DecidedAt { get; set; }
|
|
public string? DecisionNote { get; set; }
|
|
public string? DecidedByName { get; set; }
|
|
// SH-101 additions
|
|
public int? EvidenceDocumentId { get; set; }
|
|
public string? EvidenceFileName { get; set; }
|
|
public string? EvidenceContentType { get; set; }
|
|
public long? EvidenceSizeBytes { get; set; }
|
|
public bool EvidenceScanPassed { get; set; }
|
|
public DateTime? ExpiresAt { get; set; }
|
|
public string? NotificationStatus { get; set; }
|
|
public string? NotificationError { get; set; }
|
|
public bool HasChangesRequested { get; set; }
|
|
}
|
|
|
|
public class PortalCommentDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Commenttext { get; set; }
|
|
public string? Commenter { get; set; }
|
|
public string? CommentType { get; set; }
|
|
public DateTime? CreatedDate { get; set; }
|
|
}
|
|
|
|
public class PortalWorkOrderDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? InternalWONumber { get; set; }
|
|
public string? WorkerOrderTitle { get; set; }
|
|
public string? Description { get; set; }
|
|
public string? Priority { get; set; }
|
|
public DateTime? DueDate { get; set; }
|
|
public string? Trade { get; set; }
|
|
public string? SubTrade { get; set; }
|
|
public string? Service { get; set; }
|
|
public string? Problem { get; set; }
|
|
public string? SiteCode { get; set; }
|
|
}
|
|
|
|
public class DispatcherContactDTO
|
|
{
|
|
public string? Name { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? Phone { get; set; }
|
|
}
|
|
|
|
public class PortalLocationDTO
|
|
{
|
|
public string? Name { get; set; }
|
|
public string? Address1 { get; set; }
|
|
public string? City { get; set; }
|
|
public string? State { get; set; }
|
|
public string? Zip { get; set; }
|
|
}
|
|
|
|
public class VendorDispatchDetailDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? DispatchNumber { get; set; }
|
|
public string? PONumber { get; set; }
|
|
public string? Status { get; set; }
|
|
public string? InvoiceNumber { get; set; }
|
|
public string? InvoiceStatus { get; set; }
|
|
public string? PaymentStatus { get; set; }
|
|
public decimal? NTEAmount { get; set; }
|
|
public string? Description { get; set; }
|
|
public DateTime? ScheduledDate { get; set; }
|
|
public DateTime? CompletedDate { get; set; }
|
|
public DateTime? DispatchedAt { get; set; }
|
|
public DateTime? AcknowledgedAt { get; set; }
|
|
public DateTime? StatusUpdatedAt { get; set; }
|
|
public PortalWorkOrderDTO? WorkOrder { get; set; }
|
|
public PortalLocationDTO? Location { get; set; }
|
|
public DispatcherContactDTO? DispatcherContact { get; set; }
|
|
public IEnumerable<PortalChecklistItemDTO> Checklist { get; set; } = Enumerable.Empty<PortalChecklistItemDTO>();
|
|
public IEnumerable<PortalSignoffDTO> Signoffs { get; set; } = Enumerable.Empty<PortalSignoffDTO>();
|
|
public IEnumerable<PortalCommentDTO> Comments { get; set; } = Enumerable.Empty<PortalCommentDTO>();
|
|
public IEnumerable<PortalUpliftDTO> UpliftRequests { get; set; } = Enumerable.Empty<PortalUpliftDTO>();
|
|
public IEnumerable<VendorPortalDocumentDTO> Documents { get; set; } = Enumerable.Empty<VendorPortalDocumentDTO>();
|
|
public PortalMediaCountsDTO? MediaCounts { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Per-work-order photo/video usage, so the portal can pre-check an upload
|
|
/// before sending it. The server still enforces the limit on upload.
|
|
/// </summary>
|
|
public class PortalMediaCountsDTO
|
|
{
|
|
public int MaxPhotos { get; set; }
|
|
public int MaxVideos { get; set; }
|
|
/// <summary>Photos/videos on the work order, counted for evidence uploads.</summary>
|
|
public int Photos { get; set; }
|
|
public int Videos { get; set; }
|
|
/// <summary>
|
|
/// Photos/videos counted for a new completion version, which replaces the dispatch's
|
|
/// latest document and so does not count it.
|
|
/// </summary>
|
|
public int CompletionPhotos { get; set; }
|
|
public int CompletionVideos { get; set; }
|
|
}
|
|
|
|
public class VendorPortalDocumentDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? OriginalFileName { get; set; }
|
|
public string? ContentType { get; set; }
|
|
public long SizeBytes { get; set; }
|
|
public string? ScanStatus { get; set; }
|
|
public string? ReviewStatus { get; set; }
|
|
public string? RejectionReason { get; set; }
|
|
public int Version { get; set; }
|
|
public int? ReplacesDocumentId { get; set; }
|
|
public DateTime? CreatedDate { get; set; }
|
|
public DateTime? ScannedAt { get; set; }
|
|
public DateTime? ReviewedAt { get; set; }
|
|
public bool CanDownload { get; set; }
|
|
}
|
|
|
|
public class AcceptDispatchResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
public DateTime? AcknowledgedAt { get; set; }
|
|
}
|
|
|
|
public class RefuseDispatchResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
public DateTime? RefusedAt { get; set; }
|
|
}
|
|
|
|
public class ChangeStatusResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
public DateTime? CompletedDate { get; set; }
|
|
}
|
|
|
|
public class ChecklistItemResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public bool IsCompleted { get; set; }
|
|
public string? CompletedBy { get; set; }
|
|
public DateTime? CompletedAt { get; set; }
|
|
}
|
|
|
|
public class SignoffResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public DateTime? SignedAt { get; set; }
|
|
}
|
|
|
|
public class CommentResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Commenttext { get; set; }
|
|
public string? Commenter { get; set; }
|
|
public DateTime? CreatedDate { get; set; }
|
|
}
|
|
|
|
public class UpliftRequestResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
public int RequiredTier { get; set; }
|
|
public decimal? CurrentNTE { get; set; }
|
|
public decimal RequestedNTE { get; set; }
|
|
// SH-101 additions
|
|
public bool NoApprovalRequired { get; set; }
|
|
public int? EvidenceDocumentId { get; set; }
|
|
public DateTime? ExpiresAt { get; set; }
|
|
public string? NotificationStatus { get; set; }
|
|
public bool IdempotentReplay { get; set; }
|
|
}
|
|
|
|
public class CancelUpliftResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
}
|
|
|
|
// SH-101: vendor withdraw (canonical) and revise results.
|
|
public class WithdrawUpliftResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
}
|
|
|
|
public class ReviseUpliftResultDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Status { get; set; }
|
|
public int RequiredTier { get; set; }
|
|
public decimal? CurrentNTE { get; set; }
|
|
public decimal RequestedNTE { get; set; }
|
|
public int? EvidenceDocumentId { get; set; }
|
|
public DateTime? ExpiresAt { get; set; }
|
|
public string? NotificationStatus { get; set; }
|
|
}
|
|
}
|