feat: audio track history

This commit is contained in:
Krispire Admin
2026-07-02 19:22:54 +05:30
parent 44a0016513
commit 9c9c46caf1
7 changed files with 273 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
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"`
}