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

import lombok.Getter;

@Getter
public enum VideoRecentNotUsedEnum {

    // 近期未使用 0-历史 1-近30天 2-近14天 3-近7天 4-近3天
    HISTORY(0, "历史", 0),
    THIRTY_DAYS(1, "近30天", 30),
    FOURTEEN_DAYS(2, "近14天", 14),
    SEVEN_DAYS(3, "近7天", 7),
    THREE_DAYS(4, "近3天", 3);

    private final Integer val;
    private final String desc;
    private final Integer days;

    VideoRecentNotUsedEnum(Integer val, String desc, Integer days) {
        this.val = val;
        this.desc = desc;
        this.days = days;
    }

    public static VideoRecentNotUsedEnum getByVal(Integer val) {
        for (VideoRecentNotUsedEnum e : values()) {
            if (e.getVal().equals(val)) {
                return e;
            }
        }
        return null;
    }
}
