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

import lombok.Getter;

@Getter
public enum PlanStatusEnum {
    DELETED(0, "已删除"),
    NORMAL(1, "正常"),

    other(999, "其他");

    private final int val;
    private final String description;

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

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

        return other;
    }


}
