package com.tzld.piaoquan.api.common.enums.contentplatform;

import lombok.Getter;

@Getter
public enum AccountStatusEnum {
    FORBIDDEN(0, "封禁"),
    NORMAL(1, "正常"),

    other(999, "其他");

    private final int val;
    private final String description;

    AccountStatusEnum(int val, String description) {
        this.val = val;
        this.description = description;
    }

    public static AccountStatusEnum from(int val) {
        for (AccountStatusEnum statusEnum : AccountStatusEnum.values()) {
            if (statusEnum.getVal() == val) {
                return statusEnum;
            }
        }

        return other;
    }


}
