feat: 完善艺术品审核变更流程
This commit is contained in:
@@ -46,6 +46,12 @@ enum AuditStatus {
|
||||
REJECTED
|
||||
}
|
||||
|
||||
enum ArtworkRevisionStatus {
|
||||
PENDING
|
||||
APPROVED
|
||||
REJECTED
|
||||
}
|
||||
|
||||
enum NodeType {
|
||||
CREATE
|
||||
PRODUCE
|
||||
@@ -144,6 +150,8 @@ model SysUser {
|
||||
operationLogs OperationLog[]
|
||||
outboundImportSessions OutboundImportSession[]
|
||||
backupRecords BackupRecord[]
|
||||
submittedArtworkRevisions ArtworkRevision[] @relation("ArtworkRevisionSubmitter")
|
||||
reviewedArtworkRevisions ArtworkRevision[] @relation("ArtworkRevisionReviewer")
|
||||
|
||||
@@map("sys_user")
|
||||
}
|
||||
@@ -202,6 +210,7 @@ model Artwork {
|
||||
certificates Certificate[]
|
||||
batches Batch[]
|
||||
traceCodes TraceCode[]
|
||||
revisions ArtworkRevision[]
|
||||
|
||||
@@index([templateId])
|
||||
@@index([status])
|
||||
@@ -209,6 +218,30 @@ model Artwork {
|
||||
@@map("artwork")
|
||||
}
|
||||
|
||||
model ArtworkRevision {
|
||||
id String @id @default(cuid())
|
||||
artworkId Int @map("artwork_id")
|
||||
title String
|
||||
reason String? @db.Text
|
||||
beforeSnapshot Json @map("before_snapshot")
|
||||
afterSnapshot Json @map("after_snapshot")
|
||||
status ArtworkRevisionStatus @default(PENDING)
|
||||
auditRemark String? @db.Text @map("audit_remark")
|
||||
submittedBy Int? @map("submitted_by")
|
||||
submittedAt DateTime @default(now()) @map("submitted_at")
|
||||
reviewedBy Int? @map("reviewed_by")
|
||||
reviewedAt DateTime? @map("reviewed_at")
|
||||
|
||||
artwork Artwork @relation(fields: [artworkId], references: [id], onDelete: Cascade)
|
||||
submitter SysUser? @relation("ArtworkRevisionSubmitter", fields: [submittedBy], references: [id])
|
||||
reviewer SysUser? @relation("ArtworkRevisionReviewer", fields: [reviewedBy], references: [id])
|
||||
|
||||
@@index([artworkId])
|
||||
@@index([status])
|
||||
@@index([submittedAt])
|
||||
@@map("artwork_revision")
|
||||
}
|
||||
|
||||
model TraceNode {
|
||||
id Int @id @default(autoincrement())
|
||||
artworkId Int @map("artwork_id")
|
||||
|
||||
Reference in New Issue
Block a user