Files
spsays-bff/internal/model/audio_progress.go
T

17 lines
650 B
Go

package model
import "time"
// AudioProgress is one persisted resume point for the floating audio
// player — the last-known playback position of a single audio file for a
// user. Key is the track URL with query/hash stripped (the stable file
// identity, owned by the frontend). Position/Duration mirror the
// HTMLAudioElement's currentTime/duration in seconds. UpdatedAt is set by
// the client so multi-device writes resolve newest-wins on upsert.
type AudioProgress struct {
Key string `json:"key"`
Position float64 `json:"position"`
Duration *float64 `json:"duration,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}