Use structs lib to map models to DB. Fix #1266
This commit is contained in:
+11
-11
@@ -5,17 +5,17 @@ import (
|
||||
)
|
||||
|
||||
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"`
|
||||
ID string `structs:"id" json:"id" orm:"column(id)"`
|
||||
Name string `structs:"name" json:"name"`
|
||||
UserAgent string `structs:"user_agent" json:"userAgent"`
|
||||
UserName string `structs:"user_name" json:"userName"`
|
||||
Client string `structs:"client" json:"client"`
|
||||
IPAddress string `structs:"ip_address" json:"ipAddress"`
|
||||
LastSeen time.Time `structs:"last_seen" json:"lastSeen"`
|
||||
TranscodingId string `structs:"transcoding_id" json:"transcodingId"`
|
||||
MaxBitRate int `structs:"max_bit_rate" json:"maxBitRate"`
|
||||
ReportRealPath bool `structs:"report_real_path" json:"reportRealPath"`
|
||||
ScrobbleEnabled bool `structs:"scrobble_enabled" json:"scrobbleEnabled"`
|
||||
}
|
||||
|
||||
type Players []Player
|
||||
|
||||
Reference in New Issue
Block a user