mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-06 22:55:46 +08:00
feat: 实现数据库备份与恢复
This commit is contained in:
23
server/internal/db/application/db_restore_history.go
Normal file
23
server/internal/db/application/db_restore_history.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package application
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/db/domain/entity"
|
||||
"mayfly-go/internal/db/domain/repository"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
func newDbRestoreHistoryApp(repositories *repository.Repositories) (*DbRestoreHistoryApp, error) {
|
||||
app := &DbRestoreHistoryApp{
|
||||
repo: repositories.RestoreHistory,
|
||||
}
|
||||
return app, nil
|
||||
}
|
||||
|
||||
type DbRestoreHistoryApp struct {
|
||||
repo repository.DbRestoreHistory
|
||||
}
|
||||
|
||||
// GetPageList 分页获取数据库备份历史
|
||||
func (app *DbRestoreHistoryApp) GetPageList(condition *entity.DbRestoreHistoryQuery, pageParam *model.PageParam, toEntity any, orderBy ...string) (*model.PageResult[any], error) {
|
||||
return app.repo.GetDbRestoreHistories(condition, pageParam, toEntity, orderBy...)
|
||||
}
|
||||
Reference in New Issue
Block a user