Anonymous
-
2025-01-23
- assigned_to: dinhhoabk95
Originally created by: realcodesiman
Make the below functions:
Flow {
id cuid2
createdAt datetime
updatedAt datetime
chatbotId string
userId string
folderId String?
isPublished Boolean
enableInInbox Boolean
currentVersionId // can switch version, this will save FlowVersion
}
FlowVersion {
id cuid2
createdAt datetime
updatedAt datetime
chatbotId string
flowId string
title string
nodes json
edges json
version Datetime
isDraft boolean
}
check self relation
https://www.prisma.io/docs/orm/prisma-schema/data-model/relations/self-relations#one-to-many-self-relations