Skip to content

Instantly share code, notes, and snippets.

@peterzawistowicz
Created April 17, 2015 18:27
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 peterzawistowicz/7be496a1f23370cffdd3 to your computer and use it in GitHub Desktop.
Save peterzawistowicz/7be496a1f23370cffdd3 to your computer and use it in GitHub Desktop.
var userSchema = new mongoose.Schema({
active: Boolean,
email: { type: String, trim: true, lowercase: true },
firstName: { type: String, trim: true },
lastName: { type: String, trim: true },
sp_api_key_id: { type: String, trim: true },
sp_api_key_secret: { type: String, trim: true },
subs: { type: [mongoose.Schema.Types.ObjectId], default: [] },
created: { type: Date, default: Date.now },
lastLogin: { type: Date, default: Date.now },
},
{ collection: 'user' }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment