整理model
All checks were successful
Go CI / test-and-build (push) Successful in 10s

This commit is contained in:
2026-04-06 17:40:56 +08:00
parent a067e8d17c
commit 3182b29932
9 changed files with 404 additions and 121 deletions

View File

@@ -1,6 +1,7 @@
package service
import (
"butterfliu/internal/model"
"butterfliu/internal/repository"
)
@@ -21,10 +22,10 @@ func (s *SongService) GetAllWithDetails() ([]repository.SongDetail, error) {
}
// GetMediaFilePath returns the file path of a song by its song ID.
func (s *SongService) GetMediaFile(id int) (repository.MediaFile, error) {
func (s *SongService) GetMediaFile(id int) (model.MediaFile, error) {
song, err := s.songRepo.Get(id)
if err != nil {
return repository.MediaFile{}, err
return model.MediaFile{}, err
}
return s.mediaRepo.Get(song.MediaFileID)
}