package org.springblade.modules.app.dto;

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

import java.io.Serializable;

/**
 * <p>
 * 滑动验证码出参
 * </p>
 *
 * @author wangpanpan
 * @since 2021-06-21
 */
@Data
public class InnerCaptchaResultDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    // 成功：{"repCode":"0000","repData":{"jigsawImageBase64":"iVBORw0KGgoAAAANSUhE","result":false,"secretKey":"R2CcjNhGZhxvoYa6","token":"61a1894665c246298410bfd090b3a6c9"},"success":true}
    // 失败：{"repCode":"6110","repMsg":"验证码已失效，请重新获取","success":false}

    /**
     * 0000  无异常，代表成功
     * 9999  服务器内部异常
     * 0011  参数不能为空
     * 6110  验证码已失效，请重新获取
     * 6111  验证失败
     * 6112  获取验证码失败,请联系管理员
     * 6113  底图未初始化成功，请检查路径
     * 6201  get接口请求次数超限，请稍后再试!
     * 6206  无效请求，请重新获取验证码
     * 6202  接口验证失败数过多，请稍后再试
     * 6204  check接口请求次数超限，请稍后再试!
     */
    @ApiModelProperty(value = "异常代号")
    private String repCode;

    @ApiModelProperty(value = "错误信息")
    private String repMsg;

    /**
     * {
     * "originalImageBase64": "底图base64",
     * "point": {    //默认不返回的，校验的就是该坐标信息，允许误差范围
     * "x": 205,
     * "y": 5
     * },
     * "jigsawImageBase64": "滑块图base64",
     * "token": "71dd26999e314f9abb0c635336976635", //一次校验唯一标识
     * "secretKey": "16位随机字符串", //aes秘钥，开关控制，前端根据此值决定是否加密
     * "result": false,
     * "opAdmin": false
     * }
     */
    @ApiModelProperty(value = "返回数据信息")
    private Object repData;

    @ApiModelProperty(value = "成功或者失败 true:成功 false:失败")
    private Boolean success;

}
