Pular para o conteúdo principal

RetificationDto

@raizfc/contracts


@raizfc/contracts / RetificationDto

Type Alias: RetificationDto

RetificationDto = Readonly<{ id: ID; matchId: ID; newAwayScore?: number; newHomeScore?: number; previousAwayScore: number; previousHomeScore: number; reason: string; requestedAt: ISODateString; requestedByTeamId: ID; resolution: "validated" | "cancelled"; }>

Defined in: match/match-retification.dto.ts:16

SPEC-DOMAIN-MATCH-001 "Retification: Correção auditada após validação" (IS-MVP-06.4). Produced by the retifications endpoint every time it lands a match on validated — whether that resolves a fresh dispute opened by contest (contestedvalidated, the resolve transition) or reopens an already-validated result for correction in one atomic call (request_retification immediately followed by resolve, no observable intermediate state for API consumers). previousHomeScore/previousAwayScore are always the score being replaced — identical to the new score when an open dispute is dismissed rather than upheld (still audited, per "Todas as alterações ficam auditadas"). Kept as a bounded history array on MatchDto.retifications (append-only), distinct from MatchAuditLogDto (generic, unstructured before/after) because the management screen needs a typed, orderable correction history, not a free-form audit blob.