const mongoose = require("mongoose");

const schema = mongoose.Schema;

const userSchema = new schema({
  userName: {
    type: String,
    required: true,
  },
  email: {
    type: String,
    required: true,
    unique: true,
  },
  password: {
    type: String,
    required: true,
  },
  userImage: {
    type: String,
  },
  coordinate: {
    type: String,
  },
  friends_list:[{
    friend_id:{
      type:String,
    
    },
    request_accepted:{
      type:Boolean,
      default:false
    }
  }]
});

module.exports = mongoose.model("user", userSchema);
