package com.sino.mci.channel.common.model;

public enum AccountType {
    WECOM_INTERNAL(1, "企微内部账号"),
    WECOM_AGENT(2, "企微应用"),
    WECHAT_PERSONAL(3, "pywechat 个人号"),
    DINGTALK_BOT(4, "钉钉机器人"),
    FEISHU_BOT(5, "飞书机器人"),
    WECOM_BOT(6, "企微群机器人");

    private final int code;
    private final String label;

    AccountType(int code, String label) {
        this.code = code;
        this.label = label;
    }

    public int getCode() {
        return code;
    }

    public String getLabel() {
        return label;
    }

    public static AccountType of(int code) {
        for (AccountType type : values()) {
            if (type.code == code) {
                return type;
            }
        }
        return null;
    }
}
