- Implemented complete API system with REST endpoints for all process operations, including CRUD functionality. - Added support for direct process linking via URL parameters, improving navigation and usability. - Enhanced save functionality with success/error notifications and improved state management. - Fixed navigation issues, including unsaved changes detection and automatic URL synchronization. - Resolved Vue Flow interference, allowing for seamless connector dragging between nodes. - Ensured backward compatibility for legacy process definitions, automatically upgrading them. - Introduced comprehensive toast notifications for user feedback on all operations. - Optimized performance by reducing re-renders and improving memory management. - Enhanced error handling with robust validation and graceful recovery throughout the system. - Updated UI consistency across form builder and process builder management interfaces.
98 lines
3.7 KiB
Plaintext
98 lines
3.7 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
generator jsonSchema {
|
|
provider = "prisma-json-schema-generator"
|
|
output = "./json"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "mysql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model user {
|
|
userID Int @id @default(autoincrement())
|
|
userSecretKey String? @db.VarChar(255)
|
|
userUsername String? @db.VarChar(255)
|
|
userPassword String? @db.VarChar(255)
|
|
userFullName String? @db.VarChar(255)
|
|
userEmail String? @db.VarChar(255)
|
|
userPhone String? @db.VarChar(255)
|
|
userStatus String? @db.VarChar(255)
|
|
userCreatedDate DateTime? @db.DateTime(0)
|
|
userModifiedDate DateTime? @db.DateTime(0)
|
|
forms form[] @relation("FormCreator")
|
|
processes process[] @relation("ProcessCreator")
|
|
userrole userrole[]
|
|
}
|
|
|
|
model role {
|
|
roleID Int @id @default(autoincrement())
|
|
roleName String? @db.VarChar(255)
|
|
roleDescription String? @db.VarChar(255)
|
|
roleStatus String? @db.VarChar(255)
|
|
roleCreatedDate DateTime? @db.DateTime(0)
|
|
roleModifiedDate DateTime? @db.DateTime(0)
|
|
userrole userrole[]
|
|
}
|
|
|
|
model userrole {
|
|
userRoleID Int @id @default(autoincrement())
|
|
userRoleUserID Int @default(0)
|
|
userRoleRoleID Int @default(0)
|
|
userRoleCreatedDate DateTime @db.DateTime(0)
|
|
role role @relation(fields: [userRoleRoleID], references: [roleID], onDelete: NoAction, onUpdate: NoAction, map: "FK_userrole_role")
|
|
user user @relation(fields: [userRoleUserID], references: [userID], onDelete: NoAction, onUpdate: NoAction, map: "FK_userrole_user")
|
|
|
|
@@index([userRoleRoleID], map: "FK_userrole_role")
|
|
@@index([userRoleUserID], map: "FK_userrole_user")
|
|
}
|
|
|
|
model form {
|
|
formID Int @id @default(autoincrement())
|
|
formUUID String @unique @db.VarChar(36)
|
|
formName String @db.VarChar(255)
|
|
formDescription String? @db.Text
|
|
formComponents Json
|
|
formStatus String @default("active") @db.VarChar(50)
|
|
formCreatedBy Int?
|
|
formCreatedDate DateTime @default(now()) @db.DateTime(0)
|
|
formModifiedDate DateTime? @updatedAt @db.DateTime(0)
|
|
customCSS String? @db.Text
|
|
customScript String? @db.LongText
|
|
formEvents Json?
|
|
scriptMode String? @default("safe") @db.VarChar(20)
|
|
creator user? @relation("FormCreator", fields: [formCreatedBy], references: [userID])
|
|
|
|
@@index([formCreatedBy], map: "FK_form_creator")
|
|
}
|
|
|
|
model process {
|
|
processID Int @id @default(autoincrement())
|
|
processUUID String @unique @db.VarChar(36)
|
|
processName String @db.VarChar(255)
|
|
processDescription String? @db.Text
|
|
processDefinition Json
|
|
processVersion Int @default(1)
|
|
processStatus String @default("draft") @db.VarChar(50)
|
|
processCreatedBy Int?
|
|
processCreatedDate DateTime @default(now()) @db.DateTime(0)
|
|
processModifiedDate DateTime? @updatedAt @db.DateTime(0)
|
|
isTemplate Boolean @default(false)
|
|
processCategory String? @db.VarChar(100)
|
|
processOwner String? @db.VarChar(255)
|
|
processPermissions Json?
|
|
processPriority String? @default("normal") @db.VarChar(50)
|
|
processSettings Json?
|
|
processVariables Json?
|
|
templateCategory String? @db.VarChar(100)
|
|
creator user? @relation("ProcessCreator", fields: [processCreatedBy], references: [userID])
|
|
|
|
@@index([processCreatedBy], map: "FK_process_creator")
|
|
@@index([processStatus], map: "IDX_process_status")
|
|
@@index([processCategory], map: "IDX_process_category")
|
|
@@index([isTemplate], map: "IDX_process_template")
|
|
}
|