package com.template.model.enumModel;

/**
 * @Author: binguo
 * @Date: 2023/7/6 星期四 16:34
 * @Description: com.template.model.enumModel
 * @Version: 1.0
 * 账号状态
 */
public enum eSeewoUserType {
    //用户类型，0学生，1老师
    Student(0),//学生
    Teacher(1);//老师

    private int value;

    eSeewoUserType(int value){
        this.value = value;
    }

    public int getValue() {
        return value;
    }
    public static eSeewoUserType valueOf(int value) {
        switch (value) {
            case 0:
                return eSeewoUserType.Student;
            case 1:
                return eSeewoUserType.Teacher;
            default:
                return null;
        }
    }

    public static Integer integerOf(String value) {
        switch (value) {
            case "学生":
                return 0;
            case "老师":
                return 1;
            default:
                return null;
        }
    }

    public static String stringOf(Integer value) {
        switch (value) {
            case 0:
                return "学生";
            case 1:
                return "老师";
            default:
                return null;
        }
    }
}
