mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
36 lines
783 B
Go
36 lines
783 B
Go
package entity
|
|
|
|
import (
|
|
"mayfly-go/pkg/model"
|
|
"mayfly-go/pkg/utils/timex"
|
|
"time"
|
|
)
|
|
|
|
// DbBinlog 数据库备份任务
|
|
type DbBinlog struct {
|
|
model.Model
|
|
|
|
LastStatus DbJobStatus // 最近一次执行状态
|
|
LastResult string // 最近一次执行结果
|
|
LastTime timex.NullTime // 最近一次执行时间
|
|
DbInstanceId uint64 `json:"dbInstanceId"` // 数据库实例ID
|
|
}
|
|
|
|
func NewDbBinlog(instanceId uint64) *DbBinlog {
|
|
job := &DbBinlog{}
|
|
job.Id = instanceId
|
|
job.DbInstanceId = instanceId
|
|
return job
|
|
}
|
|
|
|
// BinlogFile is the metadata of the MySQL binlog file.
|
|
type BinlogFile struct {
|
|
Name string
|
|
Size int64
|
|
|
|
// Sequence is parsed from Name and is for the sorting purpose.
|
|
Sequence int64
|
|
FirstEventTime time.Time
|
|
Downloaded bool
|
|
}
|