18 lines
314 B
Go
18 lines
314 B
Go
package model
|
|
|
|
type (
|
|
Artist struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Website string `json:"website"`
|
|
Avatar string `json:"avatar"`
|
|
}
|
|
)
|
|
|
|
func (artist Artist) GetAvatar() string {
|
|
if artist.Avatar == "" {
|
|
return "/img/default-avatar.png"
|
|
}
|
|
return artist.Avatar
|
|
}
|