feat: complete reporting and filing workflows
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user