Skip to content

Instantly share code, notes, and snippets.

@gabro
Created February 27, 2013 22:45
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 gabro/5052558 to your computer and use it in GitHub Desktop.
Save gabro/5052558 to your computer and use it in GitHub Desktop.
node-example
var userSchema = new Schema(
fb_id : String,
firstName : String,
lastName : String,
messages : [{
content : String,
positive : Boolean,
author : User,
created_at : {type : Date, default : Date.now},
updated_at : {type : Date, default : Date.now}
}],
created_at : {type : Date, default : Date.now},
updated_at : {type : Date, default : Date.now}
);
var User = new Model('User', userSchema);
module.exports = User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment