2024-08-02 21:48:26 +00:00
|
|
|
package model
|
|
|
|
|
|
|
|
type (
|
|
|
|
Artist struct {
|
2024-08-05 00:23:17 +00:00
|
|
|
ID string `json:"id"`
|
2024-08-02 21:48:26 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
Avatar string `json:"avatar"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-08-05 00:23:17 +00:00
|
|
|
func (artist Artist) GetWebsite() string {
|
|
|
|
return artist.Website
|
|
|
|
}
|
|
|
|
|
2024-08-02 21:48:26 +00:00
|
|
|
func (artist Artist) GetAvatar() string {
|
|
|
|
if artist.Avatar == "" {
|
|
|
|
return "/img/default-avatar.png"
|
|
|
|
}
|
|
|
|
return artist.Avatar
|
|
|
|
}
|