'How would I go about creating data model with one to many relationship and history
I am looking into creating fun side project where user will be able to create a daily routines with todo list inside each routine and that's fine. The thing where I am struggling is that I want to be able to save everything that has been done on that day so user can look into history tab and see what has been done yesterday or few days ago. When new day starts I want to reset all routines.
So I have routine that can have many todo points and each point can have one routine.
To save that into history do you think that creating History class with array of Day objects where each day would have array of Routine and then everytime user opens the app I could compare current date with the date in the Day object and if the date is +1 then I would jsut reset routines?
I think that I am overcomplicating something that should be easy? I appriate any suggestions, thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
