Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. var activationTokenSchema = new Schema({
  2. token: String,
  3. });
  4.  
  5. var userSchema = new Schema({
  6. name: String,
  7. login: String,
  8. email: String,
  9. password: String,
  10. balance: Number,
  11. isActivated: Boolean,
  12. activationToken: { type: Schema.Types.ObjectId, ref: 'ActivationToken' }
  13. });
  14.  
  15. const User = mongoose.model('User', userSchema);
  16. const ActivationToken = mongoose.model('ActivationToken', activationTokenSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement