package com.njcn.gather.systemops.database.pojo.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 数据库恢复参数。
 */
public class DatabaseRestoreParam {

    @Data
    @ApiModel("创建恢复任务参数")
    public static class CreateParam {
        @ApiModelProperty("目标连接 ID")
        @NotBlank(message = "连接 ID 不能为空")
        private String connectionId;
        @ApiModelProperty("备份文件 ID")
        @NotBlank(message = "备份文件 ID 不能为空")
        private String backupFileId;
        @ApiModelProperty("恢复模式：SKIP、APPEND、TRUNCATE、REPLACE")
        private String restoreMode;
        @ApiModelProperty("目标 Schema")
        private String targetSchemaName;
        @ApiModelProperty("临时密码，不保存密码时传入")
        private String temporaryPassword;
        @ApiModelProperty("覆盖确认文案")
        private String overwriteConfirmText;
    }
}
