package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 首页数据查询类别枚举
 */
@Getter
@AllArgsConstructor
public enum HomePageQueryEnum {

    USER("USER", "用户"),
    DEPT("DEPT", "部门");

    private final String code;
    private final String desc;

    public static HomePageQueryEnum getByCode(String code) {
        for (HomePageQueryEnum itemEnum : values()) {
            if (itemEnum.getCode().equals(code)) {
                return itemEnum;
            }
        }
        return null;
    }

}
