package com.quyunshuo.androidbaseframemvvm.common.enums


/**
 * 闹钟
 */
enum class AlarmClockEnum(val code:String,val content:String)  {
    OPEN_SLEEP("2","open_sleep"),
    CLOSE_SLEEP("3","close_sleep"),
    CLOSE_DEV("1","close_dev"),
    OPEN_DEV("0","open_dev");

    companion object {
        fun getEnumByValue(code: String): AlarmClockEnum? {

            for (anEnum in AlarmClockEnum.values()) {
                if (anEnum.code == code) {
                    return anEnum
                }
            }
            return null
        }

    }
}