Hello,
I work on a personal project : an application to create treasure hunts to discover a location.
-
a treasure hunt has one or several quests
-
each quest can has one or several challenges
-
each challenge has one or several riddles
But ... if all challenges are binded to the treasure hunt (start-shaped treasure hunt), they can also be binded to other challenges (one step at a time).
And a challenge can even be binded to 2 other challenges, for example A is binded to B and C, and B and C are binded to D. In this example the solution to the challenges B and C are clues to solve the challenge D.
A quest, a challenge and a riddle are nodes, links between challenges are edges.
To store the edges into the database, I can use a many to many polymorphic pivot table.
-
id
-
from_type
-
from_id
-
to_type
-
to_id
-
meta
Perhaps you have a better idea to store the edges into the database ?
Thanks for your help.
V