mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	feat: 实现数据库备份与恢复
This commit is contained in:
		
							
								
								
									
										19
									
								
								server/internal/db/domain/repository/db_restore.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								server/internal/db/domain/repository/db_restore.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
package repository
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"mayfly-go/internal/db/domain/entity"
 | 
			
		||||
	"mayfly-go/pkg/base"
 | 
			
		||||
	"mayfly-go/pkg/model"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type DbRestore interface {
 | 
			
		||||
	base.Repo[*entity.DbRestore]
 | 
			
		||||
 | 
			
		||||
	// GetDbRestoreList 分页获取数据信息列表
 | 
			
		||||
	GetDbRestoreList(condition *entity.DbRestoreQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error)
 | 
			
		||||
	AddTask(ctx context.Context, tasks ...*entity.DbRestore) error
 | 
			
		||||
	UpdateTaskStatus(ctx context.Context, task *entity.DbRestore) error
 | 
			
		||||
	GetDbNamesWithoutRestore(instanceId uint64, dbNames []string) ([]string, error)
 | 
			
		||||
	UpdateEnabled(ctx context.Context, taskId uint64, enabled bool) error
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user