package com.seer.teach.common.enums.teacher;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SmartReadEnum {

    RECENT_READ(0, "最近阅读"),
    CLASSIC(1, "经典必读"),
    HEALTH(2, "健康知识"),
    PROGRAMMING(3, "智学编程"),
    FREE(4, "限时免费");

    private final Integer type;
    private final String desc;

    public static SmartReadEnum getByType(Integer type) {
        for (SmartReadEnum e : values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }
}
