package com.aircraft.utils.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 用户类型枚举
 */
@Getter
@AllArgsConstructor
public enum UserTypeEnum {

    /**
     * 后台用户
     */
    ADMIN(0),

    /**
     * 飞行端用户
     */
    EMPLOYEES(1),

    /**
     * 客户端用户
     */
    CUSTOMER(2),


    ;





    private final Integer value;


    public static UserTypeEnum getByValue(Integer value) {
        for (UserTypeEnum type : values()) {
            if (value.equals(type.value)) {
                return type;
            }
        }
        return null; // 或抛出异常
    }
}
