package com.ms.api.dto.dsorder;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

@Data
public class AlibabaMessage {
    private String msgType;
    private JSONObject msgData;

    public boolean isRefundAfterMsg() {
        return "ORDER_BUYER_VIEW_ORDER_REFUND_AFTER_SALES".equals(msgType);
    }

    public boolean isRefundInMsg() {
        return "ORDER_BUYER_VIEW_ORDER_BUYER_REFUND_IN_SALES".equals(msgType);
    }

    public boolean isRefundMsg() {
        return isRefundAfterMsg() || isRefundInMsg();
    }
}
