Advertisement
Guest User

Untitled

a guest
Jan 28th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import mongoose from 'mongoose';
  2.  
  3. const userSchema = new mongoose.Schema({
  4.   name: String,
  5.   username: {type: String, required: true, unique: true},
  6.   password: {type: String, required: true},
  7.   admin: Boolean,
  8.   created_at: Date,
  9.   updated_at: Date,
  10. });
  11.  
  12. export const User = mongoose.model('User', userSchema);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement