Skip to content

Instantly share code, notes, and snippets.

@giltotherescue
Created January 30, 2017 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giltotherescue/39479f14a8b17db8da5c883d023c5b0a to your computer and use it in GitHub Desktop.
Save giltotherescue/39479f14a8b17db8da5c883d023c5b0a to your computer and use it in GitHub Desktop.
/*
pushId = new key created by Firebase push() via Angularfire .$add()
"order" properties indicate objects that should be sortable
*/
programs: {
[programId:pushId]: {
name: [string],
description: [string],
billingType: [string],
billingPrice: [float],
photo: [string],
video: [string],
daysPerWeek: [array]
}
}
// this data populated by a JSON file from an external API
exercises: {
[exerciseId:int] {
title: [string]
video: [string]
}
}
assessments: {
[programId:pushId]: {
[exerciseId:int] {
description: [string],
order: [int],
isMobility: [bool],
levels: {
[levelId:int]: [string]
},
}
}
}
workouts: {
[programId:pushId]: {
[levelId:string]: {
[dayId:pushId]: {
title: {string},
order: {int},
sequences: {
[sequenceId:pushId]: {
title: [string],
descriptipn: [string],
time: [int],
order: [int],
exercises: {
[exerciseId:int] {
sets: [int],
reps: [int],
rest: [string],
note: [note],
order: [int],
variations: {
deficientExerciseId: [int],
exerciseId: [int],
sets: [int],
reps: [int],
rest: [string],
note: [note]
} <!-- /variations -->
}
} <!-- /exercises -->
}
} <!-- /sequences -->
}
}
}
}
users: {
[userId:pushId]: {
name: [string],
email: [string],
createdOn: [string],
settings: [object]
}
}
userStatus: {
[userId:string]: {
[programId:string]: [levelId: string]
}
}
userHistory: {
[userId:string]: [array] [
{ title: [string] }
]
}
subscriptions: {
[userId:string]: [
{
programId: [string],
createdOn: [string]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment