user.js 342 B

123456789101112131415
  1. import mongoose from "mongoose";
  2. const userSchema = mongoose.Schema({
  3. name: { type: String, required: true },
  4. email: { type: String, required: true },
  5. password: { type: String, required: true },
  6. id: { type: String},
  7. avatar: {type: String, default: ''},
  8. });
  9. const User = mongoose.model("user", userSchema);
  10. export default User;