feat: 追溯码新增分组管理与批量分组/启停接口
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -202,6 +202,17 @@ model Certificate {
|
||||
@@map("certificate")
|
||||
}
|
||||
|
||||
model TraceCodeGroup {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
remark String?
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
traceCodes TraceCode[]
|
||||
|
||||
@@map("trace_code_group")
|
||||
}
|
||||
|
||||
model Batch {
|
||||
id Int @id @default(autoincrement())
|
||||
batchNo String @unique @map("batch_no")
|
||||
@@ -222,6 +233,7 @@ model TraceCode {
|
||||
shortCode String @unique @map("short_code")
|
||||
artworkId Int? @unique @map("artwork_id")
|
||||
batchId Int? @map("batch_id")
|
||||
groupId Int? @map("group_id")
|
||||
sku String?
|
||||
archiveNo String? @map("archive_no")
|
||||
outTime DateTime? @map("out_time")
|
||||
@@ -236,10 +248,12 @@ model TraceCode {
|
||||
|
||||
artwork Artwork? @relation(fields: [artworkId], references: [id])
|
||||
batch Batch? @relation(fields: [batchId], references: [id])
|
||||
group TraceCodeGroup? @relation(fields: [groupId], references: [id])
|
||||
proofs BlockchainProof[]
|
||||
queryLogs QueryLog[]
|
||||
|
||||
@@index([batchId])
|
||||
@@index([groupId])
|
||||
@@index([status])
|
||||
@@map("trace_code")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user