Files
mayfly-go/server/internal/db/domain/repository/db_job.go
kanzihuang 94da6df33e !84 fix: 修复数据库备份与恢复问题
* refactor dbScheduler
* fix: 按团队名称检索团队
* feat: 创建数据库资源时支持全选数据库
* refactor dbScheduler
* fix: 修复数据库备份与恢复问题
2024-01-17 08:37:22 +00:00

29 lines
718 B
Go

package repository
import (
"context"
"mayfly-go/internal/db/domain/entity"
)
type DbJobBase interface {
// GetById 根据实体id查询
GetById(e entity.DbJob, id uint64, cols ...string) error
// UpdateById 根据实体id更新实体信息
UpdateById(ctx context.Context, e entity.DbJob, columns ...string) error
// DeleteById 根据实体主键删除实体
DeleteById(ctx context.Context, id uint64) error
// UpdateLastStatus 更新任务执行状态
UpdateLastStatus(ctx context.Context, job entity.DbJob) error
}
type DbJob interface {
DbJobBase
// AddJob 添加数据库任务
AddJob(ctx context.Context, jobs any) error
UpdateEnabled(ctx context.Context, jobId uint64, enabled bool) error
}