package com.template.model.enumModel;

/**
 * @Author: binguo
 * @Date: 2023/7/6 星期四 16:34
 * @Description: com.template.model.enumModel
 * @Version: 1.0
 * 账号状态
 */
public enum eExamType {
    Interim(1),//期中
    Terminal(2);//期末

    private int value;

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

    public int getValue() {
        return value;
    }
    public static eExamType valueOf(int value) {
        switch (value) {
            case 1:
                return eExamType.Interim;
            case 2:
                return eExamType.Terminal;
            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;
        }
    }
}
