calvh / mooden

A simple tool to track your mood
0 stars 1 forks source link

Add ability to track mood over multiple time periods during the day. #17

Open mysteryman9000 opened 3 years ago

mysteryman9000 commented 3 years ago

For example "Morning, Afternoon, Night".

calvh commented 3 years ago

Right now entries are stored by datapoint. Each datapoint has its associated timestamp. I suggest adding an "Average" schema. Each entry in "Average" will have 5 fields: a date, a morning average, an afternoon average, a night average, and a day average. The average is updated each time a new datapoint is added. That way, retrieving averages is a simple matter of fetching a database entries based on the date field.

calvh commented 3 years ago

Gonna use the bucket model described here

https://docs.mongodb.com/manual/tutorial/model-time-data/