package globals

import "time"

type VboxDate struct {
	Second     string `json:"second"`
	Minute     string `json:"minute"`
	Hour       string `json:"hour"`
	DayofMonth string `json:"dayofMonth"`
	Month      string `json:"month"`
	DayofWeek  string `json:"dayofWeek"`
	Year       string `json:"year"`
}
type AlarmClockInfo struct {
	Id         uint64   `json:"id"`
	Vboxid     string   `json:"vboxid"`
	Label      int      `json:"label"`
	Type       int      `json:"type"`
	VoiceType  int      `json:"voiceType"`
	VoiceName  string   `json:"voiceName"`
	ResUrl     string   `json:"resUrl"`
	Status     int      `json:"status"`
	UpdateTime uint64   `json:"updateTime"`
	CreateTime uint64   `json:"createTime"`
	VboxDate   VboxDate `json:"vboxDate"`

	ResType  string `json:"voiceResType"`
	ResValue string `json:"voiceRes"`
}

type AlarmType uint8

const (
	AlarmType_AlarmClock AlarmType = iota
	AlarmType_Alert
)

type DbusAlarmClockInfo struct {
	Data []AlarmClockInfo `json:"data"`
}

type DbusRemindInfo struct {
	Data []RemindInfo `json:"data"`
}

type DbusDelAlarms struct {
	Type AlarmType `json:"type"`
	Ids  []uint64  `json:"ids"`
}

type DbusAddAlarm struct {
	Type AlarmType        `json:"type"`
	Data []AlarmClockInfo `json:"data"`
}

type RemindInfo_Type int

const (
	RemindInfo_Type_Once RemindInfo_Type = iota + 1
	RemindInfo_Type_EveryDay
	RemindInfo_Type_WorkDay
	RemindInfo_Type_Weekend
	RemindInfo_Type_EveryWeek
	RemindInfo_Type_EveryMonth
	RemindInfo_Type_EveryYear
)

//Remind start
type RemindInfo struct {
	Id         uint64          `json:"id"`
	Vboxid     string          `json:"vboxid"`
	Label      int             `json:"label"`
	Type       RemindInfo_Type `json:"type"`
	VoiceType  int             `json:"voiceType"`
	Status     int             `json:"status"`
	UpdateTime uint64          `json:"updateTime"`
	CreateTime uint64          `json:"createTime"`
	Remark     string          `json:"remark"`
	VboxDate   VboxDate        `json:"vboxDate"`
}

type DbusAlarmRemind struct {
	Id         uint64    `json:"alarmId"`
	Type       AlarmType `json:"itemtype"`
	Priority   int       `json:"priority"`
	RepeatMode int       `json:"repeatMode"`
	Year       int       `json:"year"`
	Month      int       `json:"month"`
	Day        int       `json:"day"`
	Hour       int       `json:"hour"`
	Minute     int       `json:"minute"`
	Second     int       `json:"second"`
	WeekDay    int       `json:"weekDay"`
	VoiceId    uint64    `json:"voiceId"`
	//	ResUrl string `json:"resUrl"`
	Tts        string      `json:"strTips"`
	ComingTime time.Time   `json:"-"`
	SCmdTime   time.Time   `json:"-"`
	RingTimes  int         `json:"-"`
	DelayTimer *time.Timer `json:"-"`

	ResType  string `json:"voiceResType"`
	ResValue string `json:"voiceRes"`
}
