mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-30 11:11:28 +08:00
工作流
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/XM-GO/PandaKit/model"
|
||||
)
|
||||
|
||||
// FlowWorkInfo 工作流信息
|
||||
type FlowWorkInfo struct {
|
||||
model.BaseAutoModel
|
||||
Name string `gorm:"column:name; type:varchar(128)" json:"name"` // 流程名称
|
||||
Icon string `gorm:"column:icon; type:varchar(128)" json:"icon" ` // 流程标签
|
||||
Structure json.RawMessage `gorm:"column:structure; type:json" json:"structure" ` // 流程结构
|
||||
Classify int `gorm:"column:classify; type:int" json:"classify"` // 分类ID
|
||||
SubmitCount int `gorm:"column:submit_count; type:int; default:0" json:"submitCount"` // 提交统计
|
||||
Creator int `gorm:"column:creator; type:int" json:"creator"` // 创建者
|
||||
Remarks string `gorm:"column:remarks; type:varchar(1024)" json:"remarks"` // 流程备注
|
||||
Name string `gorm:"column:name; type:varchar(128)" json:"name"` // 流程名称
|
||||
Icon string `gorm:"column:icon; type:varchar(128)" json:"icon" ` // 流程标签
|
||||
Structure model.JSONB `gorm:"column:structure; type:json" json:"structure" ` // 流程结构
|
||||
FormStructure model.JSONB `gorm:"column:structure; type:json" json:"structure" ` // 表单结构
|
||||
Classify int `gorm:"column:classify; type:int" json:"classify"` // 分类ID
|
||||
SubmitCount int `gorm:"column:submit_count; type:int; default:0" json:"submitCount"` // 提交统计
|
||||
Creator int `gorm:"column:creator; type:int" json:"creator"` // 创建者
|
||||
Cc int `gorm:"column:cc; type:int" json:"cc"` // 抄送人
|
||||
Remarks string `gorm:"column:remarks; type:varchar(1024)" json:"remarks"` // 流程备注
|
||||
}
|
||||
|
||||
func (FlowWorkInfo) TableName() string {
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/XM-GO/PandaKit/model"
|
||||
)
|
||||
|
||||
// FlowWorkOrderTemplate 工单绑定模版数据
|
||||
type FlowWorkOrderTemplate struct {
|
||||
model.BaseAutoModel
|
||||
WorkOrder int `gorm:"column:work_order; type: int" json:"work_order"` // 工单ID
|
||||
FormStructure json.RawMessage `gorm:"column:form_structure; type: json" json:"form_structure"` // 表单结构
|
||||
FormData json.RawMessage `gorm:"column:form_data; type: json" json:"form_data"` // 表单数据
|
||||
WorkOrder int `gorm:"column:work_order; type: int" json:"work_order"` // 工单ID
|
||||
FormStructure model.JSONB `gorm:"column:form_structure; type: json" json:"form_structure"` // 表单结构
|
||||
FormData model.JSONB `gorm:"column:form_data; type: json" json:"form_data"` // 表单数据
|
||||
}
|
||||
|
||||
func (FlowWorkOrderTemplate) TableName() string {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/XM-GO/PandaKit/model"
|
||||
)
|
||||
|
||||
// FlowWorkTask 工作流任务
|
||||
type FlowWorkTask struct {
|
||||
model.BaseAutoModel
|
||||
Name string `gorm:"column:name; type: varchar(256)" json:"name"` // 任务名称
|
||||
TaskType string `gorm:"column:task_type; type: varchar(45)" json:"task_type"` // 任务类型
|
||||
Content string `gorm:"column:content; type: text" json:"content"` // 任务内容
|
||||
Creator int `gorm:"column:creator; type: int" json:"creator"` // 创建者
|
||||
Remarks string `gorm:"column:remarks; type: text" json:"remarks"` // 备注
|
||||
}
|
||||
|
||||
func (FlowWorkTask) TableName() string {
|
||||
return "flow_work_task"
|
||||
}
|
||||
|
||||
// FlowWorkTaskHistory 工作流任务执行历史
|
||||
type FlowWorkTaskHistory struct {
|
||||
model.BaseAutoModel
|
||||
Task int `gorm:"column:task; type: int" json:"task"` // 任务ID
|
||||
Name string `gorm:"column:name; type: varchar(256)" json:"name"` // 任务名称
|
||||
TaskType int `gorm:"column:task_type; type: int" json:"task_type"` // 任务类型, python, shell
|
||||
ExecutionTime string `gorm:"column:execution_time; type: varchar(128)" json:"execution_time"` // 执行时间
|
||||
Result string `gorm:"column:result; type: text" json:"result"` // 任务返回
|
||||
}
|
||||
|
||||
func (FlowWorkTaskHistory) TableName() string {
|
||||
return "flow_work_task_history"
|
||||
}
|
||||
Reference in New Issue
Block a user