I'm developing an Android App for managing tasks in a household like cleaning the kitchen, vacuum cleaning ...
I implemented a Json based API to retrieve and store data from a central database.
Every household can have one or more residents. It also can have any count of tasks.
The task handling is where my question is related to. The task's due dates should be equally distributed to each resident in a household and every resident should be able to view and complete their tasks.
In my current design, it has the following properties: Id(int), Label(String), Description(String), Start_date(date), Start_resident_id(int), household_id(int),week_interval(int), weekdays(int)
start_date: the date when the task was created (needed to calculate due dates)
week_interval: this task should be done very X week ( 1 weekly, 4 monthly, ... )
weekdays: the weekday the task should be done ( e.g. 14 means MON, THU, 1357 means MON, WED, FRI, SUN )
There is also a task_status model which is created as soon as a resident marks a task as completed.
task_status: id(Int), task_id(Int), status(int), resident_id(int), due_date(date), comment(string)
status: 1 = completed, 2 = skipped
resident_id = foreign key of the resident which has completed the task
what is the best way to calculate the due dates for each task and resident ?
is this a good design having these task_status entries to mark the tasks as completed ?