mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-09 11:11:45 +02:00
26 lines
634 B
Go
26 lines
634 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Player struct {
|
|
ID string `json:"id" orm:"column(id)"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
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"`
|
|
}
|
|
|
|
type Players []Player
|
|
|
|
type PlayerRepository interface {
|
|
Get(id string) (*Player, error)
|
|
FindByName(client, userName string) (*Player, error)
|
|
Put(p *Player) error
|
|
}
|