package com.njcn.msgpush.module.push.dal.dataobject.channel;

import com.baomidou.mybatisplus.annotation.TableName;
import com.njcn.msgpush.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author caozehui
 * @data 2026-03-02
 * @description 服务商错误码映射表
 */
@Data
@TableName("push_provider_error_code_mapping")
@EqualsAndHashCode(callSuper = true)
public class ProviderErrorCodeMappingDO extends BaseDO {
    /**
     * 主键ID
     */
    private Long id;

    /**
     * 服务商类型：telecom/cmcc/aliyun/twilio
     */
    private String providerType;

    /**
     * 渠道类型：sms/email/app
     */
    private String channel;

    /**
     * 服务商原始错误码
     */
    private String originalCode;

    /**
     * 服务商原始错误描述
     */
    private String originalMessage;

    /**
     * 统一错误码
     */
    private String unifiedErrorCode;

    /**
     * 统一错误描述
     */
    private String unifiedErrorMessage;

    /**
     * 错误类别：NETWORK/BALANCE/INVALID_PARAM/PROVIDER_ERROR/BLACKLIST
     */
    private String errorCategory;

    /**
     * 是否应该重试：0-否 1-是
     */
    private Integer shouldRetry;

    /**
     * 最终状态：failed/final_failed/blacklisted/invalid_param
     */
    private String finalStatus;

    /**
     * 备注说明
     */
    private String remark;
}
