feat(service): P4 doc-faithfulness — SLA placeholder columns, issueSubclass, traceId on state.changed

Adds ticket.slaDueAt + ticket.issueSubclass + queue.slaPolicyRef (placeholder
columns, no timer logic until P7) and propagates ticket.traceId onto
ticket.state.changed events (assignment + transition). 45 tests still green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 12:25:11 +05:30
parent 7441d0ec36
commit eb04becc57
4 changed files with 21 additions and 2 deletions
@@ -123,7 +123,12 @@ export class SupportService {
subject: `ticket/${ticketId}`,
time: new Date().toISOString(),
datacontenttype: 'application/json',
insignia: { scopeSnapshotId: ticket.scopeId, idempotencyKey: `ticketstate:${ticketId}:${toState}`, dataClass: 'internal' },
insignia: {
scopeSnapshotId: ticket.scopeId,
correlationId: ticket.traceId ?? undefined,
idempotencyKey: `ticketstate:${ticketId}:${toState}`,
dataClass: 'internal',
},
data: { ticketId, fromState: ticket.state, toState },
};
const [updated] = await this.prisma.$transaction([