mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-11 20:12:54 +02:00
28 lines
764 B
Go
28 lines
764 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Player struct {
|
|
ID string `json:"id" orm:"column(id)"`
|
|
Name string `json:"name"`
|
|
UserAgent string `json:"userAgent"`
|
|
UserName string `json:"userName"`
|
|
Client string `json:"client"`
|
|
IPAddress string `json:"ipAddress"`
|
|
LastSeen time.Time `json:"lastSeen"`
|
|
TranscodingId string `json:"transcodingId"`
|
|
MaxBitRate int `json:"maxBitRate"`
|
|
ReportRealPath bool `json:"reportRealPath"`
|
|
ScrobbleEnabled bool `json:"scrobbleEnabled"`
|
|
}
|
|
|
|
type Players []Player
|
|
|
|
type PlayerRepository interface {
|
|
Get(id string) (*Player, error)
|
|
FindMatch(userName, client, typ string) (*Player, error)
|
|
Put(p *Player) error
|
|
}
|