{"size": 484, "ext": "js", "max_stars_repo_path": "src/models/item_set.js", "max_stars_repo_name": "Ilshidur/feeder.lol-item-sets-generator.org", "max_stars_repo_stars_event_min_datetime": "2021-04-29T23:51:51.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-29T23:51:51.000Z", "max_issues_repo_path": "src/models/item_set.js", "max_issues_repo_name": "league-of-legends-devs/feeder.lol-item-sets-generator.org", "max_issues_repo_issues_event_min_datetime": "2017-06-25T13:08:36.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-25T09:43:31.000Z", "max_forks_repo_path": "src/models/item_set.js", "max_forks_repo_name": "Ilshidur/feeder.lol-item-sets-generator.org", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 28, "max_forks_count": null, "avg_line_length": 19.36, "max_line_length": 53, "alphanum_fraction": 0.6632231405}
import mongoose from 'mongoose';

const SetSchema = new mongoose.Schema({
  title: String,
  champion: String,
  role: String,
  isCustom: Boolean,
  author: String,
  itemBlocks: [new mongoose.Schema({
    items: [new mongoose.Schema({
      count: Number,
      id: String,
    })],
    type: String,
  })],
});

const SetsSchema = new mongoose.Schema({
  generationDate: Date,
  patchVersion: String,
  sets: [SetSchema],
});

export default mongoose.model('ItemSet', SetsSchema);
