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

import lombok.Getter;

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

    other(999, "其他");

    private final int val;
    private final String description;

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

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

        return other;
    }


}
