mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-31 03:46:34 +08:00
feat: 系统升级支持数据库自动迁移,避免手动执行升级脚本
This commit is contained in:
@@ -14,12 +14,12 @@ import (
|
||||
type Procdef struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name" form:"name"` // 名称
|
||||
DefKey string `json:"defKey" form:"defKey"` //
|
||||
Tasks string `json:"tasks"` // 审批节点任务信息
|
||||
Status ProcdefStatus `json:"status"` // 状态
|
||||
Condition *string `json:"condition"` // 触发审批的条件(计算结果返回1则需要启用该流程)
|
||||
Remark *string `json:"remark"`
|
||||
Name string `json:"name" form:"name" gorm:"size:150;comment:流程名称"` // 名称
|
||||
DefKey string `json:"defKey" form:"defKey" gorm:"not null;size:100;comment:流程定义key"` //
|
||||
Tasks string `json:"tasks" gorm:"not null;size:3000;comment:审批节点任务信息"` // 审批节点任务信息
|
||||
Status ProcdefStatus `json:"status" gorm:"comment:状态"` // 状态
|
||||
Condition *string `json:"condition" gorm:"type:text;comment:触发审批的条件(计算结果返回1则需要启用该流程)"` // 触发审批的条件(计算结果返回1则需要启用该流程)
|
||||
Remark *string `json:"remark" gorm:"size:255;"`
|
||||
}
|
||||
|
||||
func (p *Procdef) TableName() string {
|
||||
|
||||
@@ -10,19 +10,19 @@ import (
|
||||
type Procinst struct {
|
||||
model.Model
|
||||
|
||||
ProcdefId uint64 `json:"procdefId"` // 流程定义id
|
||||
ProcdefName string `json:"procdefName"` // 流程定义名称
|
||||
ProcdefId uint64 `json:"procdefId" gorm:"not null;index:idx_procdef_id;comment:流程定义id"` // 流程定义id
|
||||
ProcdefName string `json:"procdefName" gorm:"not null;size:64;comment:流程定义名称"` // 流程定义名称
|
||||
|
||||
BizType string `json:"bizType"` // 业务类型
|
||||
BizKey string `json:"bizKey"` // 业务key
|
||||
BizForm string `json:"bizForm"` // 业务表单
|
||||
BizStatus ProcinstBizStatus `json:"bizStatus"` // 业务状态
|
||||
BizHandleRes string `json:"bizHandleRes"` // 业务处理结果
|
||||
TaskKey string `json:"taskKey"` // 当前任务key
|
||||
Status ProcinstStatus `json:"status"` // 状态
|
||||
Remark string `json:"remark"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
Duration int64 `json:"duration"` // 持续时间(开始到结束)
|
||||
BizType string `json:"bizType" gorm:"not null;size:64;comment:关联业务类型"` // 业务类型
|
||||
BizKey string `json:"bizKey" gorm:"not null;size:64;comment:关联业务key"` // 业务key
|
||||
BizForm string `json:"bizForm" gorm:"type:text;comment:业务form"` // 业务表单
|
||||
BizStatus ProcinstBizStatus `json:"bizStatus" gorm:"comment:业务状态"` // 业务状态
|
||||
BizHandleRes string `json:"bizHandleRes" gorm:"size:4000;comment:关联的业务处理结果"` // 业务处理结果
|
||||
TaskKey string `json:"taskKey" gorm:"size:100;comment:当前任务key"` // 当前任务key
|
||||
Status ProcinstStatus `json:"status" gorm:"comment:状态"` // 状态
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
EndTime *time.Time `json:"endTime" gorm:"comment:结束时间"`
|
||||
Duration int64 `json:"duration" gorm:"comment:流程持续时间(开始到结束)"` // 持续时间(开始到结束)
|
||||
}
|
||||
|
||||
func (a *Procinst) TableName() string {
|
||||
@@ -68,15 +68,15 @@ const (
|
||||
type ProcinstTask struct {
|
||||
model.Model
|
||||
|
||||
ProcinstId uint64 `json:"procinstId"` // 流程实例id
|
||||
TaskKey string `json:"taskKey"` // 当前任务key
|
||||
TaskName string `json:"taskName"` // 当前任务名称
|
||||
Assignee string `json:"assignee"` // 分配到该任务的用户
|
||||
ProcinstId uint64 `json:"procinstId" gorm:"not null;index:idx_procinst_id;comment:流程实例id"` // 流程实例id
|
||||
TaskKey string `json:"taskKey" gorm:"not null;size:64;comment:任务key"` // 当前任务key
|
||||
TaskName string `json:"taskName" gorm:"size:64;comment:任务名称"` // 当前任务名称
|
||||
Assignee string `json:"assignee" gorm:"size:64;comment:分配到该任务的用户"` // 分配到该任务的用户
|
||||
|
||||
Status ProcinstTaskStatus `json:"status"` // 状态
|
||||
Remark string `json:"remark"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
Duration int64 `json:"duration"` // 持续时间(开始到结束)
|
||||
Status ProcinstTaskStatus `json:"status" ` // 状态
|
||||
Remark string `json:"remark" gorm:"size:255;"`
|
||||
EndTime *time.Time `json:"endTime" gorm:"comment:结束时间"`
|
||||
Duration int64 `json:"duration" gorm:"comment:任务持续时间(开始到结束)"` // 持续时间(开始到结束)
|
||||
}
|
||||
|
||||
func (a *ProcinstTask) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user