mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-04-21 11:45:27 +08:00
* fix: 代码合并 * feat:支持数据库版本兼容,目前兼容了oracle11g部分特性 * fix: 修改数据同步bug,数据sql里指定修改字段别,导致未正确记录修改字段值 * feat: 数据库迁移支持定时迁移和迁移到sql文件
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
package entity
|
||
|
||
import (
|
||
"mayfly-go/pkg/model"
|
||
"time"
|
||
)
|
||
|
||
type DbTransferFile struct {
|
||
model.IdModel
|
||
IsDeleted int8 `orm:"column(is_deleted)" json:"-"` // 是否删除 1是 0否
|
||
CreateTime *time.Time `orm:"column(create_time)" json:"createTime"` // 创建时间,默认当前时间戳
|
||
Status int8 `orm:"column(status)" json:"status"` // 状态 1、执行中 2、执行成功 3、执行失败
|
||
TaskId uint64 `orm:"column(task_id)" json:"taskId"` // 迁移任务ID
|
||
LogId uint64 `orm:"column(log_id)" json:"logId"` // 日志ID
|
||
FileDbType string `orm:"column(file_db_type)" json:"fileDbType"` // sql文件数据库类型
|
||
FileName string `orm:"column(file_name)" json:"fileName"` // 显式文件名
|
||
FileUuid string `orm:"column(file_uuid)" json:"fileUuid"` // 文件真实id,拼接后可以下载
|
||
}
|
||
|
||
func (d *DbTransferFile) TableName() string {
|
||
return "t_db_transfer_files"
|
||
}
|
||
|
||
const (
|
||
DbTransferFileStatusRunning int8 = 1
|
||
DbTransferFileStatusSuccess int8 = 2
|
||
DbTransferFileStatusFail int8 = -1
|
||
)
|