feat(models): add credits to person and artist model
This commit is contained in:
parent
6cc65ada63
commit
3aef338b1b
@ -6,6 +6,21 @@ import (
|
|||||||
|
|
||||||
//#region Objects
|
//#region Objects
|
||||||
|
|
||||||
|
type Role struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PersonCredit struct {
|
||||||
|
Track TrackBrief `json:"track"`
|
||||||
|
Role Role `json:"role"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type TrackCredit struct {
|
||||||
|
Person PersonBrief `json:"person"`
|
||||||
|
Role Role `json:"role"`
|
||||||
|
}
|
||||||
|
|
||||||
type PersonBrief struct {
|
type PersonBrief struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
@ -16,19 +31,10 @@ type Person struct {
|
|||||||
PersonBrief
|
PersonBrief
|
||||||
Birthdate string `json:"birthdate"`
|
Birthdate string `json:"birthdate"`
|
||||||
Deathdate string `json:"deathdate"`
|
Deathdate string `json:"deathdate"`
|
||||||
|
Credits []PersonCredit `json:"credits"`
|
||||||
Info string `json:"info"`
|
Info string `json:"info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Role struct {
|
|
||||||
ID string `json:"id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type Credit struct {
|
|
||||||
Person PersonBrief `json:"person"`
|
|
||||||
Role Role `json:"role"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ArtistBrief struct {
|
type ArtistBrief struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
@ -36,6 +42,7 @@ type ArtistBrief struct {
|
|||||||
|
|
||||||
type Artist struct {
|
type Artist struct {
|
||||||
ArtistBrief
|
ArtistBrief
|
||||||
|
Tracks []TrackBrief `json:"tracks"`
|
||||||
Info string `json:"info"`
|
Info string `json:"info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +58,7 @@ type TrackBrief struct {
|
|||||||
|
|
||||||
type Track struct {
|
type Track struct {
|
||||||
TrackBrief
|
TrackBrief
|
||||||
Credits []Credit `json:"credits"`
|
Credits []TrackCredit `json:"credits"`
|
||||||
Lyrics string `json:"lyrics"`
|
Lyrics string `json:"lyrics"`
|
||||||
Info string `json:"info"`
|
Info string `json:"info"`
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user