mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 14:43:00 +00:00
migrating repo to Bodyrep org
This commit is contained in:
29
data/schemas/workout.js
Normal file
29
data/schemas/workout.js
Normal 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;
|
||||
Reference in New Issue
Block a user