mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 09:33:13 +00:00
Adds an extra safety note and an ordered procedure list to completion document templates, name search, creator and last-updated audit fields, a tenant-scoped count of open work orders that depend on a template, and a delete that unlinks Services while they keep requiring a document. Writes are gated by the create/edit/delete completion template team permissions instead of the Admin role.
26 lines
801 B
C#
26 lines
801 B
C#
using Data.SeaHavenIndustries.Enums;
|
|
|
|
namespace SeaHaven.DataServices.Interfaces
|
|
{
|
|
public record CompletionDocTemplateProcedureRow(
|
|
int Id,
|
|
int SortOrder,
|
|
string Name,
|
|
string Description);
|
|
|
|
// Read model for the completion document templates registry: the legacy
|
|
// columns plus authored content and audit display data.
|
|
public record CompletionDocTemplateDetailRow(
|
|
int Id,
|
|
string Name,
|
|
string ServiceKey,
|
|
WorkOrderType? WorkOrderType,
|
|
string TemplateUrl,
|
|
bool IsActive,
|
|
string? ExtraSafetyNote,
|
|
DateTime? CreatedAt,
|
|
DateTime? UpdatedAt,
|
|
string? CreatedByFirstName,
|
|
string? CreatedByLastName,
|
|
IReadOnlyList<CompletionDocTemplateProcedureRow> Procedures);
|
|
}
|