<commit_before>'use strict'

module.exports = function (sequelize, DataTypes) {
  let Token = sequelize.define('Token', {
    id: {
      type: DataTypes.UUID,
      primaryKey: true,
      defaultValue: DataTypes.UUIDV4
    },
    value: {
      type: DataTypes.STRING,
      allowNull: false
    }
  }, {
    classMethods: {
      associate: function (models) {
        Token.belongsTo(models.User, { as: 'user' })
        Token.belongsTo(models.Client, { as: 'client' })
      }
    }
  })

  return Token
}<commit_msg>Add scope field to oauth client tokens<commit_after>'use strict'

module.exports = function (sequelize, DataTypes) {
  let Token = sequelize.define('Token', {
    id: {
      type: DataTypes.UUID,
      primaryKey: true,
      defaultValue: DataTypes.UUIDV4
    },
    scope: {
      type: DataTypes.ARRAY(DataTypes.STRING(128)),
      allowNull: false,
      defaultValue: []
    },
    value: {
      type: DataTypes.STRING,
      allowNull: false
    }
  }, {
    classMethods: {
      associate: function (models) {
        Token.belongsTo(models.User, { as: 'user' })
        Token.belongsTo(models.Client, { as: 'client' })
      }
    }
  })

  return Token
}
{'fraction_non_alphanumeric': 0.13215488215488216, 'fraction_numerical': 0.004208754208754209, 'mean_word_length': 2.3971428571428572, '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': '3897297', 'n_tokens_mistral': 391, 'n_tokens_neox': 389, 'n_words': 78}