<commit_before>'use strict';

const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const GameSchema = new Schema({
  publicId: {
    type: String,
    required: true,
    unique: true,
  },
  name: {
    type: String,
    required: true,
    unique: false,
  },
  location: {
    type: String,
    required: true,
    unique: false,
  },
  updatedAt: {
    type: Number,
    unique: false,
  },
  createdAt: {
    type: Number,
    unique: false,
  },
  datePlayed: {
    type: String,
    unique: false,
  },
  results: {
    type: Schema.Types.ObjectId,

  },
},
{
  collection: 'games',
});

GameSchema.index({ playedOn: -1 });

module.exports = mongoose.model('Game', GameSchema);<commit_msg>game model stores results which reference GameResult mongo doc<commit_after>'use strict';

const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const GameSchema = new Schema({
  publicId: {
    type: String,
    required: true,
    unique: true,
  },
  name: {
    type: String,
    required: true,
    unique: false,
  },
  location: {
    type: String,
    required: true,
    unique: false,
  },
  updatedAt: {
    type: Number,
    unique: false,
  },
  createdAt: {
    type: Number,
    unique: false,
  },
  datePlayed: {
    type: String,
    unique: false,
  },
  results: [{
    type: Schema.Types.ObjectId,
    ref: 'GameResult',
    required: true,
  }],
},
{
  collection: 'games',
});

GameSchema.index({ playedOn: -1 });

module.exports = mongoose.model('Game', GameSchema);
{'fraction_non_alphanumeric': 0.14595660749506903, 'fraction_numerical': 0.0013149243918474688, 'mean_word_length': 2.88265306122449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2595520', 'n_tokens_mistral': 517, 'n_tokens_neox': 521, 'n_words': 129}