lots of post-DB cleanup
This commit is contained in:
parent
965d6f5c3e
commit
c9d950d2b2
23 changed files with 412 additions and 550 deletions
|
@ -1,7 +1,8 @@
|
|||
package model
|
||||
|
||||
type Credit struct {
|
||||
Artist `json:"artist"`
|
||||
Release Release `json:"release"`
|
||||
Artist Artist `json:"artist"`
|
||||
Role string `json:"role"`
|
||||
Primary bool `json:"primary" db:"is_primary"`
|
||||
}
|
||||
|
|
|
@ -8,24 +8,33 @@ type (
|
|||
ReleaseType string
|
||||
|
||||
Release struct {
|
||||
ID string `json:"id"`
|
||||
Visible bool `json:"visible"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
ReleaseType ReleaseType `json:"type" db:"type"`
|
||||
ReleaseDate time.Time `json:"releaseDate" db:"release_date"`
|
||||
Artwork string `json:"artwork"`
|
||||
Buyname string `json:"buyname"`
|
||||
Buylink string `json:"buylink"`
|
||||
Copyright string `json:"copyright" db:"copyright"`
|
||||
CopyrightURL string `json:"copyrightURL" db:"copyrighturl"`
|
||||
ID string `json:"id"`
|
||||
Visible bool `json:"visible"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
ReleaseType ReleaseType `json:"type" db:"type"`
|
||||
ReleaseDate time.Time `json:"releaseDate" db:"release_date"`
|
||||
Artwork string `json:"artwork"`
|
||||
Buyname string `json:"buyname"`
|
||||
Buylink string `json:"buylink"`
|
||||
Copyright string `json:"copyright" db:"copyright"`
|
||||
CopyrightURL string `json:"copyrightURL" db:"copyrighturl"`
|
||||
}
|
||||
|
||||
FullRelease struct {
|
||||
*Release
|
||||
Tracks []DisplayTrack
|
||||
Credits []Credit
|
||||
Links []Link
|
||||
Tracks []DisplayTrack `json:"tracks"`
|
||||
Credits []Credit `json:"credits"`
|
||||
Links []Link `json:"links"`
|
||||
}
|
||||
|
||||
ReleaseShorthand struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
ReleaseType ReleaseType `json:"type" db:"type"`
|
||||
ReleaseDate time.Time `json:"releaseDate" db:"release_date"`
|
||||
Artwork string `json:"artwork"`
|
||||
Buylink string `json:"buylink"`
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ type (
|
|||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Lyrics string `json:"lyrics"`
|
||||
Lyrics string `json:"lyrics" db:"lyrics"`
|
||||
PreviewURL string `json:"previewURL" db:"preview_url"`
|
||||
}
|
||||
|
||||
DisplayTrack struct {
|
||||
*Track
|
||||
Lyrics template.HTML
|
||||
Number int
|
||||
Lyrics template.HTML `json:"lyrics"`
|
||||
Number int `json:"-"`
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue