August 2025
Intermediate to advanced
294 pages
6h 59m
English
A track is a music-related resource, so we’ll add it to the Tunez.Music domain using the ash.gen.resource Mix task:
| | $ mix ash.gen.resource Tunez.Music.Track --extend postgres |
This will create a basic empty Track resource in lib/tunez/music/track.ex, as well as list it as a resource in the Tunez.Music domain. What attributes should a track have? We’re probably interested in the following:
We’ll also add an id and some timestamps for informational reasons.
All of the fields will be required, so we can add them to the Tunez.Music.Track resource ...
Read now
Unlock full access