2024-10-19 09:47:56 +00:00
|
|
|
package models
|
|
|
|
|
2024-10-20 19:59:18 +00:00
|
|
|
// ServerMessage represents the data sent to the client via WebSocket.
|
|
|
|
type ServerMessage struct {
|
2024-10-20 21:20:23 +00:00
|
|
|
Mode string `json:"mode"` // "Work", "ShortBreak", or "LongBreak"
|
|
|
|
Session int `json:"session"` // Current session number
|
|
|
|
TotalSession int `json:"total_sessions"` // Total number of sessions
|
|
|
|
TimeLeft int `json:"time_left"` // Remaining time in seconds
|
2024-10-21 06:16:26 +00:00
|
|
|
Ongoing bool `json:"ongoing"` // Ongoing pomodoro
|
|
|
|
Paused bool `json:"paused"` // Is timer paused
|
2024-10-19 09:47:56 +00:00
|
|
|
}
|