Skip to content

Instantly share code, notes, and snippets.

@sysyrin
Last active June 20, 2020 15:15
Show Gist options
  • Save sysyrin/760015b9cbfc89e1074da38b58141f48 to your computer and use it in GitHub Desktop.
Save sysyrin/760015b9cbfc89e1074da38b58141f48 to your computer and use it in GitHub Desktop.
trainingPlan model
//note: each day can have multiple plans and each plan can be in multiple days. but there can only be one set of the muscle type
//in any given day. so the unique identifier of each set is a combination of both muscle type id and day
//example:
//plan: [
//. {
//. name: '012301230123012301230123'
//. day: 1
//. }
//. {
//. name: '321032103210321032103210'
//. day: 1
//. }
//. {
//. name: '012301230123012301230123'
//. day: 2
//. }
//]
const trainingPlan = {
_id: 'ID of the training plan',
name: 'Name of the training plan',
gender: 'Gender criteria of the trianing plan',
goal: 'Target criteria of the trianing plan (build muscles, lose weight, define, inshape)',
trainingPeriod: 'number of training days in a week',
thumbnailUrl: 'url of the thumbnail image',
plan: [
//array of multiple plans
{
name: 'muscle type _id (use this to diplay the muscle type name and muscle type thumbnail image)',
day: 'nth of the week',
'workouts': [
//array of multiple workouts
{
'workoutId': '_id of the workout. matched with the list of workouts to provide more information'
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment