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

import lombok.Getter;

@Getter
public enum PublishStageEnum {
    PLATFORM(0, "平台发布"),
    USER(1, "用户获取路径"),

    other(999, "其他");

    private final int val;
    private final String description;

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

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

        return other;
    }


}
