admin.js 337 B

12345678910111213
  1. module.exports = app=>{
  2. const mongoose = app.mongoose;
  3. const Schema = mongoose.Schema;
  4. const AdminUser = new Schema({
  5. name: { type: String},
  6. password: { type: String},
  7. lastLogin: {type: Date },
  8. });
  9. //todo why 查询表admins;
  10. return mongoose.model("Admin", AdminUser);
  11. };