package com.template.model.enumModel;

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

    private int value;

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

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

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

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