添加预增加的数据库字段。

This commit is contained in:
Mr. Lan 2020-07-19 11:04:21 +08:00
parent 4a39a38255
commit 3012c0e00e
2 changed files with 9 additions and 7 deletions

View File

@ -18,6 +18,7 @@ type Info struct {
Tpls json.RawMessage `gorm:"column:tpls; type:json" json:"tpls" form:"tpls"` // 模版
Task json.RawMessage `gorm:"column:task; type:json" json:"task" form:"task"` // 任务ID, array, 可执行多个任务,可以当成通知任务,每个节点都会去执行
Creator int `gorm:"column:creator; type:int(11)" json:"creator" form:"creator"` // 创建者
Notice json.RawMessage `gorm:"column:notice; type:json" json:"notice" form:"notice"` // TODO绑定通知
}
func (Info) TableName() string {

View File

@ -12,13 +12,14 @@ import (
// 工单
type WorkOrderInfo struct {
base.Model
Title string `gorm:"column:title; type:varchar(128)" json:"title" form:"title"` // 工单标题
Process int `gorm:"column:process; type:int(11)" json:"process" form:"process"` // 流程ID
Classify int `gorm:"column:classify; type:int(11)" json:"classify" form:"classify"` // 分类ID
IsEnd int `gorm:"column:is_end; type:int(11); default:0" json:"is_end" form:"is_end"` // 是否结束, 0 未结束1 已结束
State json.RawMessage `gorm:"column:state; type:json" json:"state" form:"state"` // 状态信息
RelatedPerson json.RawMessage `gorm:"column:related_person; type:json" json:"related_person" form:"related_person"` // 工单所有处理人
Creator int `gorm:"column:creator; type:int(11)" json:"creator" form:"creator"` // 创建人
Title string `gorm:"column:title; type:varchar(128)" json:"title" form:"title"` // 工单标题
Process int `gorm:"column:process; type:int(11)" json:"process" form:"process"` // 流程ID
Classify int `gorm:"column:classify; type:int(11)" json:"classify" form:"classify"` // 分类ID
IsEnd int `gorm:"column:is_end; type:int(11); default:0" json:"is_end" form:"is_end"` // 是否结束, 0 未结束1 已结束
State json.RawMessage `gorm:"column:state; type:json" json:"state" form:"state"` // 状态信息
RelatedPerson json.RawMessage `gorm:"column:related_person; type:json" json:"related_person" form:"related_person"` // 工单所有处理人
Creator int `gorm:"column:creator; type:int(11)" json:"creator" form:"creator"` // 创建人
OrderType int `gorm:"column:order_type; type:int(11); default:1" json:"order_type" form:"order_type"` // 工单类型1正常流程2加签
}
func (WorkOrderInfo) TableName() string {