mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 07:13:12 +00:00
* refactor(api): enforce service and data-service boundaries * refactor(api): complete feature service boundaries * refactor(identity): enforce service and data boundaries * refactor(vendors): enforce service and data boundaries * refactor(workorders): enforce service and data boundaries * refactor(backend): enforce architecture and optimize dispatch * style(backend): format changed architecture files * fix(architecture): address backend review follow-ups * fix(backend): sanitize exception disclosure in changed API endpoints Replace raw exception-message disclosure (ex.Message) returned to API callers with a stable sanitized public message plus correlated structured internal logging, across the endpoints changed in this PR. - Add SanitizedErrors helper: logs the original exception at Error with a generated correlation id and returns a stable public message referencing it so support can trace without exposing internals. - Inject ILogger<T> into the 14 changed controllers and route every ex.Message/dbex.Message disclosure through the helper, preserving status codes, response shapes, and business data (e.g. OpenWorkOrders). - Leave FluentValidation (vex.Errors) and existing fixed-message catches untouched; out-of-scope controllers (Account/Contact/Employee/Asset/ PMSchedule) are unchanged. - Add focused tests proving internal exception text is not returned and that Error logging carrying the original exception is invoked. * fix(architecture): abstract job run state access * style: format board update service * test: use collection assertion idiom
98 lines
3.6 KiB
C#
98 lines
3.6 KiB
C#
using Data.SeaHavenIndustries.Enums;
|
|
|
|
namespace SeaHaven.Services.DTOs
|
|
{
|
|
public class RoleDTO
|
|
{
|
|
public string? Name { get; set; }
|
|
public string? Description { get; set; }
|
|
}
|
|
|
|
public class SettingsUserDTO
|
|
{
|
|
public string? Id { get; set; }
|
|
public string? UserName { get; set; }
|
|
public string? Email { get; set; }
|
|
public string? RoleName { get; set; }
|
|
public string? Status { get; set; }
|
|
public string? Date { get; set; }
|
|
}
|
|
|
|
public class SettingsCategoryDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public string? Name { get; set; }
|
|
}
|
|
|
|
public class SettingsTemplateDTO
|
|
{
|
|
public int Id { get; set; }
|
|
public bool? IsDeleted { get; set; }
|
|
public string? createdby { get; set; }
|
|
public string? DeleterUserId { get; set; }
|
|
public DateTime? DeletionTime { get; set; }
|
|
public DateTime? CreatedDate { get; set; }
|
|
public DateTime? LastModificationTime { get; set; }
|
|
public int? LastModifierUserId { get; set; }
|
|
|
|
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? DueDate { get; set; }
|
|
public string? AssignTo { get; set; }
|
|
public int? LocationId { get; set; }
|
|
public LifecycleStatus? LifecycleStatus { get; set; }
|
|
public string? LegacyStatus { get; set; }
|
|
public WorkOrderType? WorkOrderType { get; set; }
|
|
public string? Service { get; set; }
|
|
public int? PrimaryDispatchId { get; set; }
|
|
|
|
public DateTime? ScheduledDate { get; set; }
|
|
public DateTime? ScheduledStart { get; set; }
|
|
public DateTime? ScheduledEnd { get; set; }
|
|
public DateOnly? TargetWeek { get; set; }
|
|
public bool? ScheduleWeekOnly { get; set; }
|
|
|
|
public DateOnly? OriginalWeek { get; set; }
|
|
public DateOnly? OriginalDate { get; set; }
|
|
|
|
public int RescheduleCount { get; set; }
|
|
public int CarriedOver { get; set; }
|
|
public OperationalFlags OperationalFlags { get; set; }
|
|
|
|
public DocStatus? DocStatus { get; set; }
|
|
|
|
public string? AvettaTask { get; set; }
|
|
public DateOnly? AssignDate { get; set; }
|
|
|
|
public DateTime? DateReported { 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? CompletedDate { get; set; }
|
|
public string? Source { get; set; }
|
|
public bool? istemplate { get; set; }
|
|
public string? PO { get; set; }
|
|
public string? TT { get; set; }
|
|
public string? Priority { get; set; }
|
|
public string? Status { 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 byte[]? RowVersion { get; set; }
|
|
}
|
|
}
|