@@ -164,6 +164,7 @@ model Typebot {
|
||||
name String
|
||||
folderId String?
|
||||
groups Json
|
||||
events Json?
|
||||
variables Json
|
||||
edges Json
|
||||
theme Json
|
||||
@@ -218,6 +219,7 @@ model PublicTypebot {
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
typebotId String @unique
|
||||
groups Json
|
||||
events Json?
|
||||
variables Json
|
||||
edges Json
|
||||
theme Json
|
||||
@@ -226,21 +228,31 @@ model PublicTypebot {
|
||||
}
|
||||
|
||||
model Result {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
typebotId String
|
||||
variables Json
|
||||
isCompleted Boolean
|
||||
hasStarted Boolean?
|
||||
isArchived Boolean? @default(false)
|
||||
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
|
||||
isArchived Boolean? @default(false)
|
||||
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
|
||||
answers Answer[]
|
||||
logs Log[]
|
||||
edges VisitedEdge[]
|
||||
|
||||
@@index([typebotId, hasStarted, createdAt(sort: Desc)])
|
||||
@@index([typebotId, isCompleted])
|
||||
}
|
||||
|
||||
model VisitedEdge {
|
||||
result Result @relation(fields: [resultId], references: [id], onDelete: Cascade)
|
||||
resultId String
|
||||
edgeId String
|
||||
index Int
|
||||
|
||||
@@unique([resultId, index])
|
||||
}
|
||||
|
||||
model Log {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
Reference in New Issue
Block a user