27 lines
667 B
Go
27 lines
667 B
Go
package model
|
|
|
|
// SongDetail is a DTO for API responses with joined artist/album names.
|
|
// This is not a database model but a presentation-layer struct.
|
|
type SongDetail struct {
|
|
ID int `json:"id"`
|
|
Title string `json:"title"`
|
|
Artist string `json:"artist"`
|
|
Album string `json:"album"`
|
|
Duration int `json:"duration"`
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
type ArtistDetail struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
Songs []int `json:"songs"`
|
|
Albums []int `json:"albums"`
|
|
}
|
|
|
|
type AlbumDetail struct {
|
|
ID int `json:"id"`
|
|
Title string `json:"title"`
|
|
Artist int `json:"artist"`
|
|
Songs []int `json:"songs"`
|
|
}
|