2
0

refactor(models): 🎨 Build types from validation schemas

This commit is contained in:
Baptiste Arnaud
2022-06-07 08:49:12 +02:00
parent c67fa7d9c1
commit e79ff09b0f
62 changed files with 1268 additions and 734 deletions

View File

@ -114,15 +114,15 @@ enum GraphNavigation {
model CustomDomain {
name String @id
createdAt DateTime @default(now())
workspaceId String?
workspace Workspace? @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
workspaceId String
workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
}
model Credentials {
id String @id @default(cuid())
createdAt DateTime @default(now())
workspaceId String?
workspace Workspace? @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
workspaceId String
workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
data String // Encrypted data
name String
type String
@ -154,8 +154,8 @@ model DashboardFolder {
parentFolder DashboardFolder? @relation("ParentChild", fields: [parentFolderId], references: [id])
childrenFolder DashboardFolder[] @relation("ParentChild")
typebots Typebot[]
workspaceId String?
workspace Workspace? @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
workspaceId String
workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
}
model Typebot {
@ -179,8 +179,8 @@ model Typebot {
collaborators CollaboratorsOnTypebots[]
invitations Invitation[]
webhooks Webhook[]
workspaceId String?
workspace Workspace? @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
workspaceId String
workspace Workspace @relation(fields: [workspaceId], references: [id], onDelete: Cascade)
}
model Invitation {