package com.njcn.gather.systemops.database.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.gather.systemops.database.pojo.param.DatabaseBackupParam;
import com.njcn.gather.systemops.database.pojo.po.DatabaseBackupFile;
import com.njcn.gather.systemops.database.pojo.vo.DatabaseBackupFileVO;

import java.nio.file.Path;

/**
 * 数据库备份文件服务。
 */
public interface DatabaseBackupFileService extends IService<DatabaseBackupFile> {

    Page<DatabaseBackupFileVO> listFiles(DatabaseBackupParam.FileQueryParam param);

    boolean deleteBackupFile(String backupFileId, String confirmText);

    void validateBackupFileReadable(DatabaseBackupFile backupFile);

    Path resolveManagedPath(DatabaseBackupFile backupFile, String filePath);
}
