daily pastebin goal
5%
SHARE
TWEET

Untitled

a guest Dec 29th, 2016 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var mongoose = require('mongoose');
  2. mongoose.connect('mongodb://localhost:27017/mean-uber');
  3. var models = {};
  4. models.User = mongoose.model('User', {
  5.     name: String,
  6.     phone: String,
  7.     email: String,
  8.     password: String,
  9.     photo: String,
  10.     defaultAddresses: {
  11.         home: String,
  12.         work: String
  13.     }
  14. });
  15. models.UserAddresses = mongoose.model('UserAddresses', {
  16.     name: String,
  17.     address: String,
  18.     userId: String
  19. });
  20. module.exports = models;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top