package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 部门类型枚举
 */
@Getter
@AllArgsConstructor
public enum DeptTypeEnum {

    STATION("STATION", "机构站"),
    BRIGADE("BRIGADE", "大队"),
    MANAGER("MANAGER", "主管"),
    TEAMS("TEAMS", "班组");

    private final String code;
    private final String description;

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