I’m not very experienced with database/model relationships, so some help would be nice.
I’m writing a Phoenix app that is basically a blog. Unlike most blogs though, it’s organized by “country”. What I mean is, the user would go to the app, click a country name, and see posts related to that country. Sort of like “categories” or “topic” in a regular blog.
I have an Author -> Posts relationship working well and a Country model. I’m having trouble thinking about how Post and Country should be related. Any help?
The user would go to
post/1. The reason I have a Country model is because each Country has some data (name, description, image).
I’d also like if it a Post can “belong” to many countries; I may need that in the future.