package com.ruoyi.newwxpay.refund;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class RefundNotifyResult {
    @JsonProperty("mchid")
    private String merchantId;
    @JsonProperty("out_trade_no")
    private String outTradeNo;
    @JsonProperty("refund_id")
    private String refundId;
    @JsonProperty("refund_status")
    private String refundStatus;
    @JsonProperty("success_time")
    private String successTime;
    private Amount amount;

    @Data
    public static class Amount {
        private int total;
        private int refund;
        private String currency;
    }


    public Boolean isSuccess() {
        return "SUCCESS".equals(refundStatus);
    }
}
