Advertisement
meanbao

Untitled

Nov 27th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const mongoose = require('mongoose');
  2.  
  3. const kittenSchema = new mongoose.Schema({
  4.     name: {
  5.         type: String,
  6.         required: true,
  7.         unique: true
  8.     },
  9.     colour: String,
  10.     birthday: Date
  11. })
  12.  
  13. const Kitten = mongoose.model("Kitten", kittenSchema)
  14.  
  15. module.exports = {
  16.     model: Kitten,
  17.     schema: kittenSchema
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement