package com.sonic.lion.domain.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

public enum FreezeStatus {

    FREEZE(1, "冻结"),

    UNFREEZE(2, "已解冻");

    private final int value;

    private final String desc;

    FreezeStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static FreezeStatus get(int value) {
        for (FreezeStatus freezeStatus : values()) {
            if (freezeStatus.getValue() == value) {
                return freezeStatus;
            }
        }
        return null;
    }
}
