feat: 建立预约工作流状态历史
This commit is contained in:
1 parent
0381c0a902
commit
e9d3f77639
3 files changed
+93
-4
No files matched your search
@@ -247,15 +247,32 @@ model Booking {
|
||||
note String?
|
||||
adminNote String?
|
||||
status BookingStatus @default(received)
|
||||
workflowKey String @default("booking.basic")
|
||||
workflowVersion String @default("1.0.0")
|
||||
currentState String @default("received")
|
||||
isRead Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
items BookingItem[]
|
||||
tags BookingTag[]
|
||||
stateTransitions BookingStateTransition[]
|
||||
@@index([brandId, status, createdAt])
|
||||
@@index([customerUserId, createdAt])
|
||||
}
|
||||
|
||||
model BookingStateTransition {
|
||||
id String @id @default(uuid())
|
||||
bookingId String
|
||||
booking Booking @relation(fields: [bookingId], references: [id], onDelete: Cascade)
|
||||
workflowKey String
|
||||
workflowVersion String
|
||||
fromState String?
|
||||
toState String
|
||||
actorRole String
|
||||
createdAt DateTime @default(now())
|
||||
@@index([bookingId, createdAt])
|
||||
}
|
||||
|
||||
model BookingItem {
|
||||
id String @id @default(uuid())
|
||||
bookingId String
|
||||
|
||||
Reference in new issue
Block a user