package cn.axzo.msg.center.notices.integration.dto.response;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @description
 *  赛邮渠道基础的响应数据结构
 *
 * @author cold_blade
 * @date 2023/9/6
 * @version 1.0
 */
@Setter
@Getter
public class SubMailBaseResponse implements Serializable {

    private static final long serialVersionUID = -5569752741534086993L;

    private static final String SUCCESS_STATUS = "success";

    /**
     * 请求ID
     */
    private String requestId;

    /**
     * 请求状态
     */
    private String status;

    /**
     * 失败信息描述
     */
    private String msg;

    /**
     * 失败码
     */
    private String code;

    public boolean isSuccess() {
        return SUCCESS_STATUS.equals(this.status);
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
