package com.face.global.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@AllArgsConstructor
public enum UserTerminalEnum {
    TEACHER("teacher","教师端");

    @Getter
    private String key;

    @Getter
    private String desc;

    public static UserTerminalEnum getByCode(String status) {
        return Arrays.stream(UserTerminalEnum.values()).filter(e -> e.getKey().equals(status)).findFirst().orElse(null);
    }
}
