package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author czh
 * @desc 企业入驻方式
 * @date 2023/6/15
 */
@Getter
public enum EntryTypeEnum {

    //自主入驻
    SELF(1, "自主入驻"),
    //平台接入
    PLATFORM(2, "平台接入");

    private final int code;

    private final String name;

    EntryTypeEnum(int code, String name){
        this.code = code;
        this.name = name;
    }

    public static EntryTypeEnum getName(int code) {
        for (EntryTypeEnum entryTypeEnum : values()) {
            if (entryTypeEnum.getCode() == code) {
                return entryTypeEnum;
            }
        }
        return null;
    }
}