Files
mayfly-go/server/internal/db/domain/repository/db_job.go
kanzihuang f2b6e15cf4 !100 定时清理数据库备份数据
* feat: 优化数据库 BINLOG 同步机制
* feat: 删除数据库实例前需删除关联的数据库备份与恢复任务
* refactor: 重构数据库备份与恢复模块
* feat: 定时清理数据库备份历史和本地 Binlog 文件
* feat: 压缩数据库备份文件
2024-02-06 07:16:56 +00:00

23 lines
478 B
Go

package repository
import (
"context"
"mayfly-go/internal/db/domain/entity"
"mayfly-go/pkg/base"
)
type DbJobBase[T entity.DbJob] interface {
base.Repo[T]
// UpdateLastStatus 更新任务执行状态
UpdateLastStatus(ctx context.Context, job entity.DbJob) error
}
type DbJob[T entity.DbJob] interface {
DbJobBase[T]
// AddJob 添加数据库任务
AddJob(ctx context.Context, jobs any) error
UpdateEnabled(ctx context.Context, jobId uint64, enabled bool) error
}