User.js 366 B

123456789101112131415
  1. const {model, Schema} = require('mongoose');
  2. const User = new Schema({
  3. userName: {type: String, unique: true, required: true},
  4. hashPassword: {type: String, required: true},
  5. isAdmin: {type: Boolean, default: false},
  6. isBanned: {type: Boolean, default: false},
  7. isMutted: {type: Boolean, default: false}
  8. })
  9. module.exports = model('User', User)