package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 岗位类型枚举
 */
@Getter
@AllArgsConstructor
public enum PostTypeEnum {

    station_master("station_master", "站长", 1),
    section_chief("section_chief", "科长", 2),
    team_leader("team_leader", "班组长", 3),
    security_inspector("security_inspector", "安检员", 4);

    private final String code;
    private final String description;
    private final int level;

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

}
