migrating repo to Bodyrep org

This commit is contained in:
2013-01-19 11:23:43 -05:00
parent 31b7303f43
commit 4ea082330b
891 changed files with 142706 additions and 0 deletions

29
data/schemas/workout.js Normal file
View File

@@ -0,0 +1,29 @@
var Schema = require('mongoose').Schema;
var Split = new Schema({
reps: { type: String},
weight: { type: String}
});
var Element = new Schema({
ExerciseID: { type: String},
splits: [Split]
});
var workoutSchema = new Schema({
userID: { type: Schema.ObjectId, ref: 'User', required: true },
workoutDate: { type: Date, 'default': Date.now },
workoutTime: { type: Date, 'default': Date.now },
privacySetting: { type: Number},
Notes: { type: String},
templateID: { type: Schema.ObjectId, ref: 'Template'},
circuits: [Number],
elements: [Element]
});
module.exports = workoutSchema;