Re:Leveraging the Go Type System
by treis on Tuesday February 09, 2021 @12:46PM
(#26080419)
I think this is mostly a toy example. In the real world the Genre would have it's own data, books can belong to multiple Genres, and you'd need the concept of SubGenres. So you'd have:
Book
Genre
BookToGenre
GenreToGenre