// ============================================================================ // This is auto-generated by gf cli tool only once. Fill this file as you wish. // ============================================================================ package wf_run_log import ( "github.com/gogf/gf/database/gdb" "github.com/gogf/gf/errors/gerror" "github.com/gogf/gf/frame/g" ) type AddData struct { Uid uint `p:"uid" json:"uid"` // 用户ID FromId int `p:"from_id" json:"from_id"` // 单据ID FromTable string `p:"from_table" json:"from_table"` // 单据表 RunId uint `p:"run_id" json:"run_id"` // 流转id RunFlow uint `p:"run_flow" json:"run_flow"` // 流程ID Content string `p:"content" json:"content"` // 日志内容 Dateline uint `p:"dateline" json:"dateline"` // 添加时间 Btn string `p:"btn" json:"btn"` // 提交操作信息 Art string `p:"art" json:"art"` // 附件日志 WorkInfo string `p:"work_info" json:"work_info"` // 事务日志 } func Add(data *AddData, tx *gdb.TX) (err error) { _, err = Model.TX(tx).Save(data) if err != nil { g.Log().Error(err) err = gerror.New("工作流审批日志记录失败") } return } func GetRunLog(where g.Map) (entities []*Entity, err error) { entities, err = Model.FindAll(where) if err != nil { g.Log().Error(err) err = gerror.New("获取日志信息失败") } return }