56 lines
1.2 KiB
Go
56 lines
1.2 KiB
Go
package models
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
type Person struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Birthdate time.Time `json:"birthdate"`
|
|
Deathdate sql.NullTime `json:"deathdate"`
|
|
Info sql.NullString `json:"info"`
|
|
}
|
|
|
|
type Role struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type Credit struct {
|
|
Person Person `json:"person"`
|
|
Role Role `json:"role"`
|
|
}
|
|
|
|
type Artist struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Notes sql.NullString `json:"notes"`
|
|
}
|
|
|
|
type Track struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Artists []Artist `json:"artists"`
|
|
Duration float32 `json:"duration"`
|
|
ReleaseDate sql.NullTime `json:"release_date"`
|
|
AcquireDate time.Time `json:"acquire_date"`
|
|
ISRC sql.NullString `json:"isrc"`
|
|
Credits []Credit `json:"credits"`
|
|
Notes sql.NullString `json:"notes"`
|
|
Lyrics sql.NullString `json:"lyrics"`
|
|
}
|
|
|
|
type Alias struct {
|
|
ID string `json:"id"`
|
|
Track Track `json:"track"`
|
|
Name string `json:"name"`
|
|
Artist string `json:"artist"`
|
|
}
|
|
|
|
type Kiroku struct {
|
|
Alias Alias `json:"alias"`
|
|
Datetime time.Time `json:"datetime"`
|
|
}
|