mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-30 11:26:35 +08:00
feat: 系统升级支持数据库自动迁移,避免手动执行升级脚本
This commit is contained in:
@@ -9,24 +9,24 @@ import (
|
||||
type MachineCronJob struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name" form:"name"`
|
||||
Key string `json:"key"`
|
||||
Cron string `json:"cron"` // cron表达式
|
||||
Script string `json:"script"` // 任务内容
|
||||
Status int `json:"status" form:"status"`
|
||||
Remark string `json:"remark"` // 备注
|
||||
LastExecTime *time.Time `json:"lastExecTime"`
|
||||
SaveExecResType int `json:"saveExecResType"` // 记录执行结果类型
|
||||
Name string `json:"name" form:"name" gorm:"not null;size:255;comment:名称"` // 名称
|
||||
Key string `json:"key" gorm:"not null;size:32;comment:key"` // key
|
||||
Cron string `json:"cron" gorm:"not null;size:255;comment:cron表达式"` // cron表达式
|
||||
Script string `json:"script" gorm:"type:text;comment:脚本内容"` // 任务内容
|
||||
Status int `json:"status" form:"status" gorm:"comment:状态"` // 状态
|
||||
Remark string `json:"remark" gorm:"size:255;comment:备注"` // 备注
|
||||
LastExecTime *time.Time `json:"lastExecTime" gorm:"comment:最后执行时间"` // 最后执行时间
|
||||
SaveExecResType int `json:"saveExecResType" gorm:"comment:保存执行记录类型"` // 记录执行结果类型
|
||||
}
|
||||
|
||||
// 机器任务执行记录
|
||||
// MachineCronJobExec 机器任务执行记录
|
||||
type MachineCronJobExec struct {
|
||||
model.DeletedModel
|
||||
|
||||
CronJobId uint64 `json:"cronJobId" form:"cronJobId"`
|
||||
MachineCode string `json:"machineCode" form:"machineCode"`
|
||||
Status int `json:"status" form:"status"` // 执行状态
|
||||
Res string `json:"res"` // 执行结果
|
||||
CronJobId uint64 `json:"cronJobId" form:"cronJobId" gorm:"not null;"`
|
||||
MachineCode string `json:"machineCode" form:"machineCode" gorm:"size:50;"`
|
||||
Status int `json:"status" form:"status"` // 执行状态
|
||||
Res string `json:"res" gorm:"size:4000;"` // 执行结果
|
||||
ExecTime time.Time `json:"execTime"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user