package com.base.locationsharewhite.fcm

/**
 * 推送类型
 * 0=定时、1=fcm、2=解锁、3=电量、4=安装与卸载
 */
@JvmInline
value class MsgType private constructor(val value: Int) {
    companion object {
        val TIMER = MsgType(0)
        val FCM = MsgType(1)
        val UNLOCK = MsgType(2)
        val BATTERY = MsgType(3)
        val PACKAGE = MsgType(4)
        fun from(adsType: Int): MsgType {
            return when (adsType) {
                TIMER.value -> TIMER
                FCM.value -> FCM
                UNLOCK.value -> UNLOCK
                BATTERY.value -> BATTERY
                else -> PACKAGE
            }
        }
    }
}