Guest User

Untitled

a guest
Feb 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. var userSchema = new Schema({
  2. username: {type: String, unique: true, trim: true},
  3. password: {type: String},
  4. email: {type: String, trim: true},
  5. avatar: {type: String},
  6. fullname: {type: String},
  7. bio: {type: String},
  8. phone: {type: Number},
  9. country: {type: String},
  10. postal: {type: Number},
  11. followers: [{ type: Schema.ObjectId, ref: 'User' }],
  12. followed: [{ type: Schema.ObjectId, ref: 'User' }],
  13. registered: {type: Date, default: Date.now}
  14.  
  15. });
  16.  
  17. var User = mongoose.model('users',userSchema);
Add Comment
Please, Sign In to add comment