Replies: 1 comment
-
|
I think the first solution would be best, add the widget types you want and create parsers and type gaurds for them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I've been testing WatermelonDB a bit and decided to use it for my application. But I have some questions on how best to model the data.
On the top level my app will have "Projects", and under each project I will have different "Widgets"; for example TodoWidget and DateWidget. But I also want to be able to pull for example all TodoWidgets to create a summary for all things that needs to be done across all projects.
For example:
So how would I best model this? I have thought of two ways.
id,type(todo, date, etc),project_id, and finally adatafield which be a JSON field that the widget can modify freely.I feel 2 would probably be better, but could it be a problem if I have too many relations between a project and all the different widgets? Would it also be possible to have a union type for a relation?
Beta Was this translation helpful? Give feedback.
All reactions