{"size": 649, "ext": "js", "max_stars_repo_path": "server/models/Review.js", "max_stars_repo_name": "gabivlj/R", "max_stars_repo_stars_event_min_datetime": "2019-08-18T10:53:10.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-25T00:32:13.000Z", "max_issues_repo_path": "server/models/Review.js", "max_issues_repo_name": "gabivlj/R", "max_issues_repo_issues_event_min_datetime": "2019-11-22T00:31:34.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T09:56:36.000Z", "max_forks_repo_path": "server/models/Review.js", "max_forks_repo_name": "gabivlj/R", "max_forks_repo_forks_event_min_datetime": "2020-05-31T01:39:55.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-31T01:39:55.000Z"}
{"max_stars_count": 7, "max_issues_count": 4, "max_forks_count": 1, "avg_line_length": 16.641025641, "max_line_length": 57, "alphanum_fraction": 0.5793528505}
const mongoose = require('mongoose');

const { Schema } = mongoose;

const ReviewsSchema = new Schema({
  objectID: { type: String, required: true },
  // Morelike html
  username: String,
  userID: {
    ref: 'users',
    type: Schema.Types.ObjectId,
  },
  modelType: {
    type: String,
    default: 'albums',
  },
  text: String,
  show: {
    type: Boolean,
    default: false,
  },
  likes: [
    {
      ref: 'users',
      type: Schema.Types.ObjectId,
    },
  ],
  dislikes: [
    {
      ref: 'users',
      type: Schema.Types.ObjectId,
    },
  ],
});

const Reviews = mongoose.model('reviews', ReviewsSchema);

module.exports = Reviews;
