package com.crm.rely.backend.core.enums;

/**
 * 字典
 *
 * @author luke
 * @create 2024/11/21
 */
public enum DictType {


    REGISTER_LINK(1, "REGISTER_LINK");

    private final Integer code;
    private final String desc;

    DictType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static DictType matchCode(Integer code) {
        for (DictType type : DictType.values()) {
            if (type.getCode() == code) {
                return type;
            }
        }
        return null;
    }


}
