Skip to content

Instantly share code, notes, and snippets.

@danared
Created March 27, 2015 18:42
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 danared/b383afb88097b7501c73 to your computer and use it in GitHub Desktop.
Save danared/b383afb88097b7501c73 to your computer and use it in GitHub Desktop.
var breakfastSchema = new mongoose.Schema({
steak: {
type: String,
required: true,
enum: ['flank', 'ribeye']
},
eggs: {
type: Number,
required: true,
min: 2
}
});
var Breakfast = mongoose.model('breakfast', breakfastSchema, 'breakfasts');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment