-
Notifications
You must be signed in to change notification settings - Fork 1
Schema's
var userSchema = new Schema({ username: String, email: String, password: String, isInCampus: Boolean, isActive: Boolean, isAdmin: Boolean }, { timestamp: true });
var contentSchema = new Schema({ type: { "type": "string", "enum": ["resource", "challenge"]}, contentUrl: String, title: String, description: String }, { timestamp: true })
var challengeSchema = new Schema({ userId: String, contentId: String, hasSubmitted: Boolean, Submission: String, pointsAwarded: String, Type: { "type": "string", "enum": ["individual", "pair", "group"]}, Pair: [{ type: app.mongoose.Schema.ObjectId, ref: 'userSchema'}], Group: [{ type: app.mongoose.Schema.ObjectId, ref: 'userSchema'}], hasOptedOut: boolean, Deadline: { type: Date, default: Date.now } }, { timestamp: true });