- Introduced a new proxy endpoint for API calls during workflow execution to handle CORS issues and streamline API interactions. - Updated the authorization logic to support Basic Auth with both token and username/password options, improving flexibility in API authentication. - Enhanced the API request building process to accommodate new node data structures, including dynamic handling of headers, parameters, and body content. - Improved error handling and response management in the workflow execution process, ensuring better feedback and control over API call outcomes. - Refactored the workflow page to utilize the new API call structure, enhancing overall workflow execution reliability and user experience.
223 lines
8.8 KiB
Plaintext
223 lines
8.8 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 caseInstance {
|
|
caseID Int @id @default(autoincrement())
|
|
caseUUID String @unique @db.VarChar(36)
|
|
processID Int
|
|
caseName String @db.VarChar(255)
|
|
caseStatus String @default("active") @db.VarChar(50)
|
|
caseStartedBy Int?
|
|
caseVariables Json?
|
|
caseSettings Json?
|
|
caseDefinition Json?
|
|
caseCreatedDate DateTime @default(now()) @db.DateTime(0)
|
|
caseModifiedDate DateTime? @db.DateTime(0)
|
|
caseCompletedDate DateTime? @db.DateTime(0)
|
|
startedBy user? @relation(fields: [caseStartedBy], references: [userID])
|
|
process process @relation(fields: [processID], references: [processID])
|
|
caseTimeline caseTimeline[]
|
|
task task[]
|
|
|
|
@@index([processID], map: "FK_case_process")
|
|
@@index([caseStartedBy], map: "FK_case_startedBy")
|
|
@@index([caseStatus], map: "IDX_case_status")
|
|
}
|
|
|
|
model caseTimeline {
|
|
timelineID Int @id @default(autoincrement())
|
|
caseID Int
|
|
timelineType String @db.VarChar(50)
|
|
timelineDescription String? @db.Text
|
|
timelineDate DateTime @default(now()) @db.DateTime(0)
|
|
timelineCreatedBy Int?
|
|
caseInstance caseInstance @relation(fields: [caseID], references: [caseID])
|
|
user user? @relation(fields: [timelineCreatedBy], references: [userID])
|
|
|
|
@@index([caseID], map: "FK_caseTimeline_case")
|
|
@@index([timelineCreatedBy], map: "FK_caseTimeline_createdBy")
|
|
@@index([timelineDate], map: "IDX_caseTimeline_date")
|
|
}
|
|
|
|
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? @db.DateTime(0)
|
|
customCSS String? @db.Text
|
|
customScript String? @db.LongText
|
|
formEvents Json?
|
|
scriptMode String? @default("safe") @db.VarChar(20)
|
|
creator user? @relation(fields: [formCreatedBy], references: [userID])
|
|
formHistory formHistory[]
|
|
task task[]
|
|
|
|
@@index([formCreatedBy], map: "FK_form_creator")
|
|
}
|
|
|
|
model formHistory {
|
|
historyID Int @id @default(autoincrement())
|
|
formID Int
|
|
formUUID String @db.VarChar(36)
|
|
formName String @db.VarChar(255)
|
|
formDescription String? @db.Text
|
|
formComponents Json
|
|
formStatus String @db.VarChar(50)
|
|
customCSS String? @db.Text
|
|
customScript String? @db.LongText
|
|
formEvents Json?
|
|
scriptMode String? @db.VarChar(20)
|
|
versionNumber Int
|
|
changeDescription String? @db.Text
|
|
savedBy Int?
|
|
savedDate DateTime @default(now()) @db.DateTime(0)
|
|
form form @relation(fields: [formID], references: [formID], onDelete: Cascade)
|
|
user user? @relation(fields: [savedBy], references: [userID])
|
|
|
|
@@index([formID], map: "FK_formHistory_form")
|
|
@@index([savedBy], map: "FK_formHistory_savedBy")
|
|
@@index([savedDate], map: "IDX_formHistory_date")
|
|
@@index([formUUID], map: "IDX_formHistory_uuid")
|
|
}
|
|
|
|
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? @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)
|
|
processDeletedDate DateTime? @db.DateTime(0)
|
|
caseInstance caseInstance[]
|
|
creator user? @relation(fields: [processCreatedBy], references: [userID])
|
|
processHistory processHistory[]
|
|
|
|
@@index([processCreatedBy], map: "FK_process_creator")
|
|
@@index([processCategory], map: "IDX_process_category")
|
|
@@index([processStatus], map: "IDX_process_status")
|
|
@@index([isTemplate], map: "IDX_process_template")
|
|
}
|
|
|
|
model processHistory {
|
|
historyID Int @id @default(autoincrement())
|
|
processID Int
|
|
processUUID String @db.VarChar(36)
|
|
processName String @db.VarChar(255)
|
|
processDescription String? @db.Text
|
|
processDefinition Json
|
|
processVersion Int
|
|
processStatus String @db.VarChar(50)
|
|
processCategory String? @db.VarChar(100)
|
|
processOwner String? @db.VarChar(255)
|
|
processPermissions Json?
|
|
processPriority String? @db.VarChar(50)
|
|
processSettings Json?
|
|
processVariables Json?
|
|
templateCategory String? @db.VarChar(100)
|
|
versionNumber Int
|
|
changeDescription String? @db.Text
|
|
savedBy Int?
|
|
savedDate DateTime @default(now()) @db.DateTime(0)
|
|
process process @relation(fields: [processID], references: [processID], onDelete: Cascade)
|
|
user user? @relation(fields: [savedBy], references: [userID])
|
|
|
|
@@index([processID], map: "FK_processHistory_process")
|
|
@@index([savedBy], map: "FK_processHistory_savedBy")
|
|
@@index([savedDate], map: "IDX_processHistory_date")
|
|
@@index([processUUID], map: "IDX_processHistory_uuid")
|
|
}
|
|
|
|
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 task {
|
|
taskID Int @id @default(autoincrement())
|
|
taskUUID String @unique @db.VarChar(36)
|
|
caseID Int
|
|
taskName String @db.VarChar(255)
|
|
taskType String @db.VarChar(50)
|
|
taskStatus String @default("pending") @db.VarChar(50)
|
|
taskAssignedTo Int?
|
|
taskFormID Int?
|
|
taskData Json?
|
|
taskCreatedDate DateTime @default(now()) @db.DateTime(0)
|
|
taskModifiedDate DateTime? @db.DateTime(0)
|
|
taskCompletedDate DateTime? @db.DateTime(0)
|
|
caseInstance caseInstance @relation(fields: [caseID], references: [caseID])
|
|
user user? @relation(fields: [taskAssignedTo], references: [userID])
|
|
form form? @relation(fields: [taskFormID], references: [formID])
|
|
|
|
@@index([taskAssignedTo], map: "FK_task_assignedTo")
|
|
@@index([caseID], map: "FK_task_case")
|
|
@@index([taskFormID], map: "FK_task_form")
|
|
@@index([taskStatus], map: "IDX_task_status")
|
|
}
|
|
|
|
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)
|
|
caseInstance caseInstance[]
|
|
caseTimeline caseTimeline[]
|
|
form form[]
|
|
formHistory formHistory[]
|
|
process process[]
|
|
processHistory processHistory[]
|
|
task task[]
|
|
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")
|
|
}
|