This commit is contained in:
2026-10-04 13:23:26 +07:00
parent 88307ed402
commit c663fbb504
20 changed files with 2125 additions and 502 deletions
@@ -23,6 +23,7 @@ type ScreenSession struct {
TimerRemainingSeconds int64
TimerState int32
TimerEndsAt *time.Time
Text string
}
func mapSession(session *screen_sessions_repo.ScreenSession) *ScreenSession {
@@ -41,5 +42,6 @@ func mapSession(session *screen_sessions_repo.ScreenSession) *ScreenSession {
TimerRemainingSeconds: session.TimerRemainingSeconds,
TimerState: session.TimerState,
TimerEndsAt: session.TimerEndsAt,
Text: session.Text,
}
}
@@ -57,6 +57,11 @@ func (s *ScreenService) SetTimer(ctx context.Context, gameID int, duration int64
return s.repo.SetTimer(ctx, gameID, duration, label)
}
// SetText updates the text screen for a game.
func (s *ScreenService) SetText(ctx context.Context, gameID int, text string) error {
return s.repo.SetText(ctx, gameID, text)
}
// SetTimerCommand updates the timer command for a game.
func (s *ScreenService) SetTimerCommand(ctx context.Context, gameID int, command int32) error {
return s.repo.SetTimerCommand(ctx, gameID, command)