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

import lombok.Getter;

@Getter
public enum VideoSourceEnum {
    RANK_HOT(0, "大数据热榜"),
    ACCOUNT_RECOMMEND(1, "猜你喜欢账号视频"),

    other(999, "其他");

    private final int val;
    private final String description;


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

    public static VideoSourceEnum from(int val) {
        for (VideoSourceEnum sourceEnum : VideoSourceEnum.values()) {
            if (sourceEnum.getVal() == val) {
                return sourceEnum;
            }
        }
        return other;
    }
}
