package com.template.model.enumModel;

/**
 * @Author: binguo
 * @Date: 2023/7/6 星期四 16:34
 * @Description: com.template.model.enumModel
 * @Version: 1.0
 * 账号状态
 */
public enum eAccessState {
    ComeIn(1),//进
    ComeOut(2);//出

    private int value;

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

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