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

import lombok.Getter;

@Getter
public enum DeletedStatusEnum {
    NOT_DELETED(0, "未删除"),
    DELETED(1, "已删除"),

    other(999, "其他");

    private final int val;
    private final String description;

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

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

        return other;
    }


}
