Add complete implementation for track-genre relationship management,
following the established albumhasgenre pattern. This enables tracking
which genres are associated with each track in the media library.
Changes:
- Fix trackhasgenre.proto: Correct CreateTrackHasGenreRequest to use
fk_track_id instead of fk_album_id
- Enhance TrackHasGenre model with nullable constraints, constructor,
and toString method
- Implement TrackHasGenreRepository with full CRUD operations
- Implement TrackHasGenreService with business logic and validation
- Add TrackHasGenreMapper for entity/protobuf conversion
- Create action handlers:
* CreateTrackHasGenreHandler (trackhasgenre.create)
* DeleteTrackHasGenreHandler (trackhasgenre.delete)
* GetTrackHasGenreByIdHandler (trackhasgenre.getById)
* GetTrackHasGenreHandler (trackhasgenre.getAll)
- Register TrackHasGenreService in DelegateActionManager for
automatic handler discovery and dependency injection
The implementation validates track and genre existence before creating
relationships and provides proper error handling with appropriate HTTP
status codes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>