package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 大队性质枚举
 */
@Getter
@AllArgsConstructor
public enum BrigadeNatureEnum {

    SECURITY_CHECK("SECURITY_CHECK", "安检"),
    GENERAL_ADMINISTRATION("GENERAL_ADMINISTRATION", "综管"),
    QUALITY_CONTROL("QUALITY_CONTROL", "品控"),
    TRAINING("TRAINING", "培训"),
    EQUIPMENT("EQUIPMENT", "设备"),
    COMPREHENSIVE("COMPREHENSIVE", "综合");

    private final String code;
    private final String desc;

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

}
