package com.neusoft.smart.pos.dto.oss;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class UploadNotifyRequest implements Serializable {

    @NotNull(message = "商户号不能为空")
    @NotEmpty(message = "商户号不能为空")
    @ApiModelProperty(name = "mcode", value = "商户号", dataType = "String" ,required=true)
    private String mcode;

    @NotNull(message = "签名不能为空")
    @NotEmpty(message = "签名不能为空")
    @ApiModelProperty(name = "sign", value = "签名", dataType = "String" ,required=true)
    private String sign;

    @NotNull(message = "上传目录不能为空")
    @NotEmpty(message = "上传目录不能为空")
    @ApiModelProperty(name = "dir", value = "上传目录", dataType = "String" ,required=true)
    private String dir;

    @NotNull(message = "上传文件名不能为空")
    @NotEmpty(message = "上传文件名不能为空")
    @ApiModelProperty(name = "filename", value = "上传文件名", dataType = "String" ,required=true)
    private String filename;

    @NotNull(message = "文件地址不能为空")
    @NotEmpty(message = "文件地址不能为空")
    @ApiModelProperty(name = "key", value = "OSS服务器上传完整文件地址", dataType = "String" ,required=true)
    private String key;

    @NotNull(message = "上传结果不能为空")
    @NotEmpty(message = "上传结果不能为空")
    @ApiModelProperty(name = "result", value = "上传是否成功，成功（true），失败（false）", dataType = "String" ,required=true)
    private String result;

    @ApiModelProperty(name = "message", value = "成功可空；失败的话传失败原因，也可空", dataType = "String")
    private String message;

    @NotNull(message = "执行动作枚举不能为空")
    @NotEmpty(message = "执行动作枚举不能为空")
    @ApiModelProperty(name = "action", value = "执行动作枚举", dataType = "String" ,required=true)
    private String action;

    @NotNull(message = "时间戳不能为空")
    @NotEmpty(message = "时间戳不能为空")
    @ApiModelProperty(name = "timestamp", value = "时间戳", dataType = "String" ,required=true)
    private String timestamp;

    @NotNull(message = "随机数不能为空")
    @NotEmpty(message = "随机数不能为空")
    @ApiModelProperty(name = "nonce", value = "随机数", dataType = "String" ,required=true)
    private String nonce;
}
