package com.hfkj.openapi.v1.model.request;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;

/**
 * 请求查询交易模型
 * @className: TradePreorderModel
 * @author: HuRui
 * @date: 2023/5/23
 **/
@Data
public class RequestRefundTradeModel {

    /**
     * 商户号
     */
    @NotBlank(message = "商户号必填项")
    private String merchantNo;

    /**
     * 商户交易单号
     */
    @Length(min = 6, max = 50, message = "商户交易单号长度限制6至50位字符串长度")
    @NotBlank(message = "商户交易单号必填项")
    private String outTradeNo;

    /**
     * 退款单号
     */
    @Length(min = 6, max = 50, message = "退款单号长度限制6至50位字符串长度")
    @NotBlank(message = "退款单号必填项")
    private String refundTradeNo;

    /**
     * 退款金额
     */
    @DecimalMax(value = "99999999", message = "退款最大金额99999999元")
    @DecimalMin(value = "0.01", message = "退款最小金额0.01元")
    @NotBlank(message = "退款金额必填项")
    private String refundAmount;

    /**
     * 退款原因
     */
    @Length(max = 30, message = "退款描述最多支持30位字符")
    private String refundReason;

    /**
     * 签名参数
     */
    @NotBlank(message = "签名必填项")
    private String sign;

}
