mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 11:53:12 +00:00
Persist primary/extra services, service notes, free-text POC, and tech/vendor notes on create/patch/board/detail instead of embedding them in description.
106 lines
3.6 KiB
C#
106 lines
3.6 KiB
C#
using Data.SeaHavenIndustries.Enums;
|
|
|
|
namespace SeaHaven.Services.DTOs
|
|
{
|
|
public class WorkOrderDetailDto
|
|
{
|
|
public WorkOrderDetailInfoDto Info { get; set; } = new();
|
|
public WorkOrderCompletionDto Completion { get; set; } = new();
|
|
public List<WorkOrderCommentDto> Comments { get; set; } = new();
|
|
public List<WorkOrderAuditEntryDto> Audit { get; set; } = new();
|
|
public List<WorkOrderMediaFileDto> Media { get; set; } = new();
|
|
}
|
|
|
|
public class WorkOrderDetailInfoDto : WorkOrderBoardRowDto
|
|
{
|
|
public string? Description { get; set; }
|
|
public string? Trade { get; set; }
|
|
public string? Problem { get; set; }
|
|
public string? SubTrade { get; set; }
|
|
public DateOnly? OriginalWeek { get; set; }
|
|
public DateOnly? OriginalDate { get; set; }
|
|
public DateTime? CompletedDate { get; set; }
|
|
public string? VendorNotes { get; set; }
|
|
}
|
|
|
|
public class CompletionDocTemplateDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string Name { get; set; } = "";
|
|
public string ServiceKey { get; set; } = "";
|
|
public WorkOrderType? WorkOrderType { get; set; }
|
|
public string TemplateUrl { get; set; } = "";
|
|
public bool IsActive { get; set; }
|
|
}
|
|
|
|
public class CompletionDocTemplateCreateDto
|
|
{
|
|
public string Name { get; set; } = "";
|
|
public string ServiceKey { get; set; } = "";
|
|
public WorkOrderType? WorkOrderType { get; set; }
|
|
public string TemplateUrl { get; set; } = "";
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public class WorkOrderCompletionDto
|
|
{
|
|
public DocStatus? DocStatus { get; set; }
|
|
public CompletionDocTemplateDto? Template { get; set; }
|
|
public string? SignOffName { get; set; }
|
|
public string? SignOffAttachment { get; set; }
|
|
public string? SignOffSignature { get; set; }
|
|
public List<DispatchSignoffDto> DispatchSignoffs { get; set; } = new();
|
|
}
|
|
|
|
public class DispatchSignoffDto
|
|
{
|
|
public int DispatchId { get; set; }
|
|
public string? SignoffType { get; set; }
|
|
public string? Name { get; set; }
|
|
public string? SignedAt { get; set; }
|
|
}
|
|
|
|
public class WorkOrderCommentDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string? AuthorId { get; set; }
|
|
public string? AuthorName { get; set; }
|
|
public string Text { get; set; } = "";
|
|
public string Time { get; set; } = "";
|
|
public string? Documents { get; set; }
|
|
}
|
|
|
|
public class WorkOrderCommentCreateDto
|
|
{
|
|
public string Text { get; set; } = "";
|
|
}
|
|
|
|
public class WorkOrderAuditEntryDto
|
|
{
|
|
public string Type { get; set; } = "manual";
|
|
public string? DispatcherId { get; set; }
|
|
public string Action { get; set; } = "";
|
|
public string? FieldName { get; set; }
|
|
public string OldValue { get; set; } = "";
|
|
public string NewValue { get; set; } = "";
|
|
public string Time { get; set; } = "";
|
|
public int? DispatchId { get; set; }
|
|
}
|
|
|
|
public class WorkOrderMediaFileDto
|
|
{
|
|
public int Id { get; set; }
|
|
public WorkOrderMediaCategory Category { get; set; }
|
|
public string Url { get; set; } = "";
|
|
public string? FileName { get; set; }
|
|
public string? UploadedAt { get; set; }
|
|
public bool IsLegacy { get; set; }
|
|
}
|
|
|
|
public class WorkOrderCompletionDocUploadDto
|
|
{
|
|
public string? SignOffName { get; set; }
|
|
public string? SignOffSignature { get; set; }
|
|
public string? WorkOrderVersion { get; set; }
|
|
}
|
|
}
|