This commit is contained in:
panda
2023-03-29 22:08:53 +08:00
parent b9f0bd744c
commit b247985bbe
18 changed files with 529 additions and 50 deletions

View File

@@ -5,8 +5,8 @@ import "github.com/XM-GO/PandaKit/model"
// FlowWorkClassify 工作流流程分类
type FlowWorkClassify struct {
model.BaseAutoModel
Name string `gorm:"column:name; type: varchar(128)" json:"name"` // 分类名称
Creator int `gorm:"column:creator; type: int(11)" json:"creator"` // 创建者
Name string `gorm:"column:name; type: varchar(128)" json:"name"` // 分类名称
Creator int `gorm:"column:creator; type: int" json:"creator"` // 创建者
}
func (FlowWorkClassify) TableName() string {

View File

@@ -8,16 +8,13 @@ import (
// 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(11)" json:"classify"` // 分类ID
Templates json.RawMessage `gorm:"column:templates; type:json" json:"templates"` // 模版
Task json.RawMessage `gorm:"column:task; type:json" json:"task"` // 任务ID, array, 可执行多个任务,可以当成通知任务,每个节点都会去执行
SubmitCount int `gorm:"column:submit_count; type:int(11); default:0" json:"submitCount"` // 提交统计
Creator int `gorm:"column:creator; type:int(11)" json:"creator"` // 创建者
Notice json.RawMessage `gorm:"column:notice; type:json" json:"notice"` // 绑定通知
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 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"` // 流程备注
}
func (FlowWorkInfo) TableName() string {

View File

@@ -8,17 +8,17 @@ import (
// FlowWorkOrder 工作流工单
type FlowWorkOrder struct {
model.BaseAutoModel
Title string `gorm:"column:title; type:varchar(128)" json:"title"` // 工单标题
Priority int `gorm:"column:priority; type:int(11)" json:"priority"` // 工单优先级 1正常 2紧急 3非常紧急
Process int `gorm:"column:process; type:int(11)" json:"process"` // 流程ID
Classify int `gorm:"column:classify; type:int(11)" json:"classify"` // 分类ID
IsEnd int `gorm:"column:is_end; type:int(11); default:0" json:"is_end"` // 是否结束, 0 未结束1 已结束
IsDenied int `gorm:"column:is_denied; type:int(11); default:0" json:"is_denied"` // 是否被拒绝, 0 没有1 有
State json.RawMessage `gorm:"column:state; type:json" json:"state"` // 状态信息
RelatedPerson json.RawMessage `gorm:"column:related_person; type:json" json:"related_person"` // 工单所有处理人
Creator int `gorm:"column:creator; type:int(11)" json:"creator"` // 创建人
UrgeCount int `gorm:"column:urge_count; type:int(11); default:0" json:"urge_count"` // 催办次数
UrgeLastTime int `gorm:"column:urge_last_time; type:int(11); default:0" json:"urge_last_time"` // 上一次催促时间
Title string `gorm:"column:title; type:varchar(128)" json:"title"` // 工单标题
Priority int `gorm:"column:priority; type:int" json:"priority"` // 工单优先级 1正常 2紧急 3非常紧急
Process int `gorm:"column:process; type:int" json:"process"` // 流程ID
Classify int `gorm:"column:classify; type:int" json:"classify"` // 分类ID
IsEnd int `gorm:"column:is_end; type:int; default:0" json:"is_end"` // 是否结束, 0 未结束1 已结束
IsDenied int `gorm:"column:is_denied; type:int; default:0" json:"is_denied"` // 是否被拒绝, 0 没有1 有
State json.RawMessage `gorm:"column:state; type:json" json:"state"` // 状态信息
RelatedPerson json.RawMessage `gorm:"column:related_person; type:json" json:"related_person"` // 工单所有处理人
Creator int `gorm:"column:creator; type:int" json:"creator"` // 创建人
UrgeCount int `gorm:"column:urge_count; type:int; default:0" json:"urge_count"` // 催办次数
UrgeLastTime int `gorm:"column:urge_last_time; type:int; default:0" json:"urge_last_time"` // 上一次催促时间
}
func (FlowWorkOrder) TableName() string {

View File

@@ -8,7 +8,7 @@ import (
// FlowWorkOrderTemplate 工单绑定模版数据
type FlowWorkOrderTemplate struct {
model.BaseAutoModel
WorkOrder int `gorm:"column:work_order; type: int(11)" json:"work_order"` // 工单ID
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"` // 表单数据
}

View File

@@ -7,17 +7,17 @@ import (
// FlowWorkStage 工作流工序(流转历史)
type FlowWorkStage struct {
model.BaseAutoModel
Title string `gorm:"column:title; type: varchar(128)" json:"title"` // 工单标题
WorkOrder int `gorm:"column:work_order; type: int(11)" json:"work_order"` // 工单ID
State string `gorm:"column:state; type: varchar(128)" json:"state"` // 工单状态
Source string `gorm:"column:source; type: varchar(128)" json:"source"` // 源节点ID
Target string `gorm:"column:target; type: varchar(128)" json:"target"` // 目标节点ID
Stage string `gorm:"column:stage; type: varchar(128)" json:"stage"` // 流转ID
Status int `gorm:"column:status; type: int(11)" json:"status"` // 流转状态 1 同意, 0 拒绝, 2 其他
Processor string `gorm:"column:processor; type: varchar(45)" json:"processor"` // 处理人
ProcessorId int `gorm:"column:processor_id; type: int(11)" json:"processor_id"` // 处理人ID
CostDuration int64 `gorm:"column:cost_duration; type: int(11)" json:"cost_duration"` // 处理时长
Remarks string `gorm:"column:remarks; type: longtext" json:"remarks"` // 备注
Title string `gorm:"column:title; type: varchar(128)" json:"title"` // 工单标题
WorkOrder int `gorm:"column:work_order; type: int" json:"work_order"` // 工单ID
State string `gorm:"column:state; type: varchar(128)" json:"state"` // 工单状态
Source string `gorm:"column:source; type: varchar(128)" json:"source"` // 源节点ID
Target string `gorm:"column:target; type: varchar(128)" json:"target"` // 目标节点ID
Stage string `gorm:"column:stage; type: varchar(128)" json:"stage"` // 流转ID
Status int `gorm:"column:status; type: int" json:"status"` // 流转状态 1 同意, 0 拒绝, 2 其他
Processor string `gorm:"column:processor; type: varchar(45)" json:"processor"` // 处理人
ProcessorId int `gorm:"column:processor_id; type: int" json:"processor_id"` // 处理人ID
CostDuration int64 `gorm:"column:cost_duration; type: int" json:"cost_duration"` // 处理时长
Remarks string `gorm:"column:remarks; type: text" json:"remarks"` // 备注
}
func (FlowWorkStage) TableName() string {

View File

@@ -9,9 +9,9 @@ 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: longtext" json:"content"` // 任务内容
Creator int `gorm:"column:creator; type: int(11)" json:"creator"` // 创建者
Remarks string `gorm:"column:remarks; type: longtext" json:"remarks"` // 备注
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 {
@@ -21,11 +21,11 @@ func (FlowWorkTask) TableName() string {
// FlowWorkTaskHistory 工作流任务执行历史
type FlowWorkTaskHistory struct {
model.BaseAutoModel
Task int `gorm:"column:task; type: int(11)" json:"task"` // 任务ID
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(11)" json:"task_type"` // 任务类型, python, shell
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: longtext" json:"result"` // 任务返回
Result string `gorm:"column:result; type: text" json:"result"` // 任务返回
}
func (FlowWorkTaskHistory) TableName() string {

View File

@@ -1,17 +1,16 @@
package entity
import (
"encoding/json"
"github.com/XM-GO/PandaKit/model"
)
// FlowWorkTemplates 工作流表单模板
type FlowWorkTemplates struct {
model.BaseAutoModel
Name string `gorm:"column:name; type: varchar(128)" json:"name" binding:"required"` // 模板名称
FormStructure json.RawMessage `gorm:"column:form_structure; type: json" json:"form_structure" binding:"required"` // 表单结构
Creator int `gorm:"column:creator; type: int(11)" json:"creator"` // 创建者
Remarks string `gorm:"column:remarks; type: longtext" json:"remarks"` // 备注
Name string `gorm:"column:name; type: varchar(128)" json:"name" binding:"required"` // 模板名称
FormStructure model.JSONB `gorm:"column:form_structure; type: json" json:"form_structure"` // 表单结构
Creator int `gorm:"column:creator; type: int" json:"creator"` // 创建者
Remarks string `gorm:"column:remarks; type: text" json:"remarks"` // 备注
}
func (FlowWorkTemplates) TableName() string {