1. Meals or exercise ... and dates within those
Meals (1797 calories) consumed |
|
Exercise (683 calories) burned |
|
2. Dates ... and meals or exercise within those
02/25/2016 (0 calories total) |
|
02/26/2016 (1114 calories total) |
|
3. Model data as it came from the server (and could go back with a PUT)
{
"goal": 1300,
"M": [
{
"when": "2016-02-25",
"name": "snack",
"items": [
{
"item": "Snickers bar",
"kcal": 305
}
]
},
{
"when": "2016-02-26",
"name": "Breakfast",
"items": [
{
"item": "Nachos",
"kcal": 223
},
{
"item": "Dip",
"kcal": 371
},
{
"item": "Salsa",
"kcal": 188
}
]
},
{
"when": "2016-02-26",
"name": "Lunch",
"items": [
{
"item": "Steak",
"kcal": 498
},
{
"item": "Mash",
"kcal": 212
}
]
}
],
"E": [
{
"when": "2016-02-26",
"name": "Gym",
"items": [
{
"item": "Running Machine",
"kcal": -210
},
{
"item": "Step Machine",
"kcal": -88
},
{
"item": "Weights",
"kcal": -80
}
]
},
{
"when": "2016-02-25",
"name": "Swim",
"items": [
{
"item": "42 laps",
"kcal": -305
}
]
}
]
}
4. Model underpinning view #1
[
{
"name": "Meals",
"plural": "items",
"verb": "consumed",
"data": [
{
"when": "2016-02-25",
"name": "snack",
"items": [
{
"item": "Snickers bar",
"kcal": 305
}
]
},
{
"when": "2016-02-26",
"name": "Breakfast",
"items": [
{
"item": "Nachos",
"kcal": 223
},
{
"item": "Dip",
"kcal": 371
},
{
"item": "Salsa",
"kcal": 188
}
]
},
{
"when": "2016-02-26",
"name": "Lunch",
"items": [
{
"item": "Steak",
"kcal": 498
},
{
"item": "Mash",
"kcal": 212
}
]
}
]
},
{
"name": "Exercise",
"plural": "exercises",
"verb": "burned",
"data": [
{
"when": "2016-02-26",
"name": "Gym",
"items": [
{
"item": "Running Machine",
"kcal": -210
},
{
"item": "Step Machine",
"kcal": -88
},
{
"item": "Weights",
"kcal": -80
}
]
},
{
"when": "2016-02-25",
"name": "Swim",
"items": [
{
"item": "42 laps",
"kcal": -305
}
]
}
]
}
]
5. Model underpinning view #2
{
"2016-02-25": [
{
"type": "Meal",
"plural": "items",
"verb": "consumed",
"name": "snack",
"items": [
{
"item": "Snickers bar",
"kcal": 305
}
]
},
{
"type": "Exercise",
"plural": "exercises",
"verb": "burned",
"name": "Swim",
"items": [
{
"item": "42 laps",
"kcal": -305
}
]
}
],
"2016-02-26": [
{
"type": "Meal",
"plural": "items",
"verb": "consumed",
"name": "Breakfast",
"items": [
{
"item": "Nachos",
"kcal": 223
},
{
"item": "Dip",
"kcal": 371
},
{
"item": "Salsa",
"kcal": 188
}
]
},
{
"type": "Meal",
"plural": "items",
"verb": "consumed",
"name": "Lunch",
"items": [
{
"item": "Steak",
"kcal": 498
},
{
"item": "Mash",
"kcal": 212
}
]
},
{
"type": "Exercise",
"plural": "exercises",
"verb": "burned",
"name": "Gym",
"items": [
{
"item": "Running Machine",
"kcal": -210
},
{
"item": "Step Machine",
"kcal": -88
},
{
"item": "Weights",
"kcal": -80
}
]
}
]
}