started adding more user flags, added user editing screen

This commit is contained in:
2013-02-26 22:23:24 -05:00
parent b2b75eacf2
commit 31d37d1a5f
6 changed files with 49 additions and 14 deletions

View File

@@ -11,9 +11,16 @@ var ExerciseStat = new Schema({
var UserSchema = new mongoose.Schema({
username: {type: String, unique: true, required: true},
name: String,
email: {type: String, unique: true, required: true},
password: String,
dob_month: String,
dob_year: String,
location: String,
is_admin: {type: Boolean, 'default': false },
is_imperial: {type: Boolean, 'default': false },
gender: {type: Number, 'default': 1, min: 0 , max: 1 },
units_weight: {type: Number, 'default': 1, min: 0 , max: 1},
units_distance: {type: Number, 'default': 1, min: 0 , max: 1},
units_energy: {type: Number, 'default': 1, min: 0 , max: 1},
favorites: [{ type: Schema.ObjectId, ref: 'Exercises'}],
exercisestats: [ExerciseStat]
});