<commit_before>'use strict'

const {bookshelf} = require('../db/database')
// require('./gameWord')
// require('./word')
// require('./user')
// require('./userGame')

const Animal = bookshelf.Model.extend({
  tableName: 'games',
  // sets relationship with words
  // words: function () { return this.belongsToMany('Word').through('gameWord')},
}, {
  // gets all games
  getAllGames: function () {
    return this.forge().orderBy('id', 'ASC')
  }
  // gets all games with a specified user
  // getAllWithRelated: function() {
  //   return this.forge().orderBy('id', 'ASC').fetchAll({withRelated: ['users']})<commit_msg>added .fetchAll() to method to make test pass<commit_after>'use strict'

const {bookshelf} = require('../db/database')
// require('./gameWord')
// require('./word')
// require('./user')
// require('./userGame')

const Game = bookshelf.Model.extend({
  tableName: 'games'
  // sets relationship with words
  // words: function () { return this.belongsToMany('Word').through('gameWord')},
}, {
  // gets all games
  getAllGames: function() {
    return this.forge().orderBy('id', 'ASC').fetchAll()
  }
  // gets all games with a specified user
  // getAllWithRelated: function() {
  //   return this.forge().orderBy('id', 'ASC').fetchAll({withRelated: ['users']})
{'fraction_non_alphanumeric': 0.2049883086515978, 'fraction_numerical': 0.0, 'mean_word_length': 3.808988764044944, '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': '2523785', 'n_tokens_mistral': 404, 'n_tokens_neox': 389, 'n_words': 92}