package cn.iocoder.yudao.framework.sms.core.client.impl.sendchamp;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.iocoder.yudao.framework.sms.core.client.SmsCodeMapping;
import cn.iocoder.yudao.framework.sms.core.enums.SmsFrameworkErrorCodeConstants;

/**
 * SendChamp SmsCodeMapping 实现类
 * @author Jayden
 */
public class SendChampSmsCodeMapping implements SmsCodeMapping {
    @Override
    public ErrorCode apply(String apiCode) {
        switch (apiCode) {
            case "accepted":
            case "processing":
            case "send":
            case "delivered":
                return GlobalErrorCodeConstants.SUCCESS;
        }
        return  SmsFrameworkErrorCodeConstants.SMS_UNKNOWN;
    }
}
