backend support record playback history

This commit is contained in:
2022-11-04 18:39:24 +08:00
parent 3b90ad56d6
commit 61391ff2a5
6 changed files with 98 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package database
import (
"path/filepath"
"time"
)
type File struct {
@@ -58,6 +59,15 @@ type Feedback struct {
Time int64 `json:"time"`
}
type Playback struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
FileID int64 `json:"file_id"`
Time time.Time `json:"time"`
Method int64 `json:"method"`
Duration time.Duration `json:"Duration"`
}
var (
RoleAnonymous = int64(0)
RoleAdmin = int64(1)