I would like some help to build something a la https://pokeapi.co/ .
I have a problem when I try to make the following structure:
"forms": [
{
"url": "https://pokeapi.co/api/v2/pokemon-form/1/",
"name": "bulbasaur"
}
],
"stats": [
{
"stat": {
"url": "https://pokeapi.co/api/v2/stat/6/",
"name": "speed"
},
"effort": 0,
"base_stat": 45
},
]
Directus works fine when I have one relation field such as forms (make a new relation field to forms, get Bulbasaur, done)
I would have build monster
and the stat
table, and I need to give a value to the relation field stat
(in that case, speed
) of 45.
I tried to fiddle around with Directus with no success.
Hey André – it seems like this is more of a database architecture question. But here is a schema I would use:
monster_stats (Junction table for the many-to-many)
stats