t_user.js 400 B

123456789101112131415161718
  1. /**
  2. * Created by PC on 2018/7/5.
  3. * 用户token表
  4. */
  5. var mongoose = require("./mongodb");
  6. var Schema = mongoose.Schema;
  7. var userSchema = new Schema(
  8. {
  9. username:{type: String,default:''},//用户名
  10. token:{type: String,default:''},//token
  11. tokenTime:{type: Date}//token有效期
  12. });
  13. var user = mongoose.model('user',
  14. userSchema,'user');
  15. module.exports = user;