package com.yzx.ebrand.model

import com.blankj.utilcode.util.TimeUtils
import com.yzx.ebrand.utils.zhCn

data class MessageEventAuto(
    var list: MutableList<LeaveID>,
    val type: Int = 0
)

data class AutoSwitchChange(val type: Int)

data class RefreshTokenEvent(val token: String)


data class TimeShow(
    var year: String = "",
    var month: String = "",
    var day: String = "",
    var hour: String = "",
    var min: String = "",
    var sec: String = "",
    var week: String = ""
) {
    fun getNowObj(): TimeShow {
        //yyyy-MM-dd HH:mm:ss
        year = TimeUtils.getNowString(TimeUtils.getSafeDateFormat("yyyy").zhCn())
        month = TimeUtils.getNowString(TimeUtils.getSafeDateFormat("MM").zhCn())
        day = TimeUtils.getNowString(TimeUtils.getSafeDateFormat("dd").zhCn())
        hour = TimeUtils.getNowString(TimeUtils.getSafeDateFormat("HH").zhCn())
        min = TimeUtils.getNowString(TimeUtils.getSafeDateFormat("mm").zhCn())
        sec = TimeUtils.getNowString(TimeUtils.getSafeDateFormat("ss").zhCn())
        week = TimeUtils.getChineseWeek(System.currentTimeMillis()).replace("周", "星期")
        return this
    }

}

data class UserLoginEvent(val isLogin: Boolean = true)