mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	* refactor dbScheduler * fix: 按团队名称检索团队 * feat: 创建数据库资源时支持全选数据库 * refactor dbScheduler * fix: 修复数据库备份与恢复问题
		
			
				
	
	
		
			29 lines
		
	
	
		
			718 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			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
 | 
						|
}
 |