package com.template.model.enumModel;

/**
 * @Author: xwt
 * @Date: 2023/7/6 星期四 16:34
 * @Description: com.template.model.enumModel
 * @Version: 1.0
 * 设备类型
 */
public enum eTimeType {
    Week(1),//本周
    Month(2),//本月
    All(3);//全部

    private int value;

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

    public int getValue() {
        return value;
    }
    public static eTimeType valueOf(int value) {
        switch (value) {
            case 1:
                return eTimeType.Week;
            case 2:
                return eTimeType.Month;
            case 3:
                return eTimeType.All;
            default:
                return null;
        }
    }

    public static String stringOf(Integer value) {
        switch (value) {
            case 1:
                return "本周";
            case 2:
                return "本月";
            case 3:
                return "全部";
            default:
                return null;
        }
    }

}
