chore: sync staging

This commit is contained in:
Esdras Renan 2025-11-10 01:57:45 -03:00
parent c5ddd54a3e
commit 561b19cf66
610 changed files with 105285 additions and 1206 deletions

View file

@ -209,6 +209,52 @@ model Ticket {
@@index([tenantId, companyId])
}
model ReportExportSchedule {
id String @id @default(cuid())
tenantId String
name String
reportKeys Json
range String @default("30d")
companyId String?
companyName String?
format String @default("xlsx")
frequency String
dayOfWeek Int?
dayOfMonth Int?
hour Int @default(8)
minute Int @default(0)
timezone String @default("America/Sao_Paulo")
recipients Json
status String @default("ACTIVE")
lastRunAt DateTime?
nextRunAt DateTime?
createdBy String
updatedBy String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
runs ReportExportRun[]
@@index([tenantId, status])
@@index([tenantId, nextRunAt])
}
model ReportExportRun {
id String @id @default(cuid())
tenantId String
scheduleId String
status String @default("PENDING")
startedAt DateTime @default(now())
completedAt DateTime?
error String?
artifacts Json?
schedule ReportExportSchedule @relation(fields: [scheduleId], references: [id], onDelete: Cascade)
@@index([tenantId, status])
@@index([tenantId, scheduleId])
}
model TicketEvent {
id String @id @default(cuid())
ticketId String