feat(billing): rating engine, fechamento de periodo, dashboard platform (fase 22)
Fecha a orquestracao de Billing (agente.md secao 120-139) sobre o schema/ RatingEngine puro ja existentes: escritores do ledger UsageEvent (CALL_SECONDS no CDR, ACTIVE_DAY via sweep diario), closeBillingPeriod/ reopenBillingPeriod (fechamento imutavel com audit trail), e os controllers de price books/rate decks/plan versions/subscriptions/ periods/statements. Corrige 2 bugs reais de RLS achados no teste ponta a ponta (reopen sem tenant context, subscriptions sem withTenantContext) e adiciona teste unitario do RatingEngine (17 casos). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EWHKmcVJtstQFErbZ1AanY
This commit is contained in:
11
apps/api/src/billing/dto/reopen-period.dto.ts
Normal file
11
apps/api/src/billing/dto/reopen-period.dto.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IsString, IsUUID, MaxLength, MinLength } from "class-validator";
|
||||
|
||||
export class ReopenPeriodDto {
|
||||
@IsUUID()
|
||||
tenantId!: string;
|
||||
|
||||
@IsString()
|
||||
@MinLength(3)
|
||||
@MaxLength(500)
|
||||
reason!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user