mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	feat: 实现数据库备份与恢复
This commit is contained in:
		@@ -2,7 +2,7 @@ package entity
 | 
			
		||||
 | 
			
		||||
import "mayfly-go/pkg/model"
 | 
			
		||||
 | 
			
		||||
// 数据库实例查询
 | 
			
		||||
// InstanceQuery 数据库实例查询
 | 
			
		||||
type InstanceQuery struct {
 | 
			
		||||
	Id   uint64 `json:"id" form:"id"`
 | 
			
		||||
	Name string `json:"name" form:"name"`
 | 
			
		||||
@@ -33,3 +33,38 @@ type DbSqlExecQuery struct {
 | 
			
		||||
 | 
			
		||||
	CreatorId uint64
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DbBackupQuery 数据库备份任务查询
 | 
			
		||||
type DbBackupQuery struct {
 | 
			
		||||
	Id           uint64   `json:"id" form:"id"`
 | 
			
		||||
	DbName       string   `json:"dbName" form:"dbName"`
 | 
			
		||||
	IntervalDay  int      `json:"intervalDay" form:"intervalDay"`
 | 
			
		||||
	InDbNames    []string `json:"-" form:"-"`
 | 
			
		||||
	DbInstanceId uint64   `json:"-" form:"-"`
 | 
			
		||||
	Repeated     bool     `json:"repeated" form:"repeated"` // 是否重复执行
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DbBackupHistoryQuery 数据库备份任务查询
 | 
			
		||||
type DbBackupHistoryQuery struct {
 | 
			
		||||
	Id           uint64   `json:"id" form:"id"`
 | 
			
		||||
	DbBackupId   uint64   `json:"dbBackupId" form:"dbBackupId"`
 | 
			
		||||
	DbId         string   `json:"dbId" form:"dbId"`
 | 
			
		||||
	DbName       string   `json:"dbName" form:"dbName"`
 | 
			
		||||
	InDbNames    []string `json:"-" form:"-"`
 | 
			
		||||
	DbInstanceId uint64   `json:"dbInstanceId" form:"dbInstanceId"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DbRestoreQuery 数据库备份任务查询
 | 
			
		||||
type DbRestoreQuery struct {
 | 
			
		||||
	Id           uint64   `json:"id" form:"id"`
 | 
			
		||||
	DbName       string   `json:"dbName" form:"dbName"`
 | 
			
		||||
	InDbNames    []string `json:"-" form:"-"`
 | 
			
		||||
	DbInstanceId uint64   `json:"-" form:"-"`
 | 
			
		||||
	Repeated     bool     `json:"repeated" form:"repeated"` // 是否重复执行
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DbRestoreHistoryQuery 数据库备份任务查询
 | 
			
		||||
type DbRestoreHistoryQuery struct {
 | 
			
		||||
	Id          uint64 `json:"id" form:"id"`
 | 
			
		||||
	DbRestoreId uint64 `json:"dbRestoreId" form:"dbRestoreId"`
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user