const mongoose = require("mongoose");

var queryHistorySchema = new mongoose.Schema({
  search_query: {
    type: String,
    index: true
  },
  time : {
    type: Date,
    default: Date.now
  },
  article_clicks : {
    type: Number,
    default: 0
  },
  feedback_interactions : {
    type: Number,
    default: 0
  },
  interaction_type:{
    type: String
  },
  user: String
}

);
module.exports = mongoose.model("queryHistory", queryHistorySchema);