package com.gh.gamecenter.gamedetail.fuli.kaifu

enum class ServersCalendarAdvancedTime(val value: Int, val text: String) {
    IN_TIME(0, "准时提醒"),
    FIVE_MINUTES_IN_ADVANCE(300, "提前5分钟"),
    FIFTEEN_MINUTES_IN_ADVANCE(900, "提前15分钟"),
    THIRTY_MINUTES_IN_ADVANCE(1800, "提前30分钟");

    companion object {
        fun valueOf(value: Int?): ServersCalendarAdvancedTime {
            if (value == null) return IN_TIME

            return ServersCalendarAdvancedTime.values().firstOrNull {
                it.value == value
            } ?: IN_TIME
        }
    }
}