text: const mongoose = require('mongoose');
  const Schema = mongoose.Schema;
  
  //create schema
  const userSchema = new Schema({
      name:{
          type:String,
          required:true
      },
      email:{
          type:String,
          required:true
      },
      phone:{
          type:String,
          required:true
      },
      password:{
          type:String,
          required:true
      },
      type:{
          type:String,
          required:true
      },
      avatar: {
          type: String
      },
      join_date:{
          type:Date,
          default:Date.now
      }
  
  });
  module.exports = User = mongoose.model('users',userSchema);
  