package com.template.model.enumModel;

/**
 * @Author: binguo
 * @Date: 2023/12/6 星期三 11:20
 * @Description: com.template.model.enumModel
 * @Version: 1.0
 */
public enum ePunish {

    CodeReminder(0),//    身份码提醒：0
    FreezeOne(1),//    冻结1小时：1
    FreezeTwo(2),//    冻结2小时：2
    FreezeFour(3),//    冻结4小时：3
    FreezeEight(4),//    冻结8小时：4
    FreezeDay(5);//    冻结1天：5

    private int value;

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

    public int getValue() {
        return value;
    }

    public static ePunish valueOf(int value) {
        switch (value) {
            case 0:
                return ePunish.CodeReminder;
            case 1:
                return ePunish.FreezeOne;
            case 2:
                return ePunish.FreezeTwo;
            case 3:
                return ePunish.FreezeFour;
            case 4:
                return ePunish.FreezeEight;
            case 5:
                return ePunish.FreezeDay;
            default:
                return null;
        }
    }

    public static Integer integerOf(String value) {
        switch (value) {
            case "身份码提醒":
                return 0;
            case "冻结1小时":
                return 1;
            case "冻结2小时":
                return 2;
            case "冻结4小时":
                return 3;
            case "冻结8小时":
                return 4;
            case "冻结1天":
                return 5;
            default:
                return null;
        }
    }

    public static String stringOf(Integer value) {
        switch (value) {
            case 0:
                return "身份码提醒";
            case 1:
                return "冻结1小时";
            case 2:
                return "冻结2小时";
            case 3:
                return "冻结4小时";
            case 4:
                return "冻结8小时";
            case 5:
                return "冻结1天";
            default:
                return null;
        }
    }
}
