feat: complete reporting and filing workflows

This commit is contained in:
hectorzhao
2026-07-28 20:28:47 +08:00
parent 352a6293b4
commit 99c8c7c68b
52 changed files with 3490 additions and 376 deletions
+29
View File
@@ -1194,13 +1194,42 @@ model ReportMaterialImportBatch {
rowCount Int @default(0)
successCount Int @default(0)
failedCount Int @default(0)
reviewedById String?
reviewedAt DateTime?
createdAt DateTime @default(now())
completedAt DateTime?
items ReportMaterialImportItem[]
@@index([tenantId, createdAt])
@@index([status, createdAt])
}
model ReportMaterialImportItem {
id String @id @default(cuid())
batchId String
rowNumber Int
reportType String
operation String
targetId String?
status String @default("pending_review")
payload Json
originalSnapshot Json?
errorMessage String?
reviewReason String?
reviewedById String?
reviewedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
batch ReportMaterialImportBatch @relation(fields: [batchId], references: [id], onDelete: Cascade)
@@unique([batchId, rowNumber])
@@index([batchId, status])
@@index([reportType, status, createdAt])
@@index([targetId])
}
model ReportReceiptImport {
id String @id @default(cuid())
taskId String