<commit_before>const { bookshelf } = require('koapi/lib/model')
const Joi = require('joi')
const md5 = require('blueimp-md5')
const {default: Role} = require('../role')
const {default: Post} = require('../post')

exports.default = class User extends bookshelf.Model {
  get tableName () { return 'users' }
  get hasTimestamps () { return true }
  roles () {
    return this.belongsToMany(Role, 'user2role')
  }
  accounts () {
    return this.hasMany(Account)
  }<commit_msg>improve<commit_after>const { bookshelf } = require('koapi/lib/model')
const Joi = require('joi')
const md5 = require('blueimp-md5')
const {default: Role} = require('../role')
const {default: Post} = require('../post')

exports.default = class User extends bookshelf.Model {
  get tableName () { return 'users' }
  get hasTimestamps () { return true }
  get hidden () {
    return ['password']
  }
  roles () {
    return this.belongsToMany(Role, 'user2role')
  }
  accounts () {
    return this.hasMany(Account)
  }
{'fraction_non_alphanumeric': 0.16161616161616163, 'fraction_numerical': 0.006060606060606061, 'mean_word_length': 4.005050505050505, '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': '4477603', 'n_tokens_mistral': 328, 'n_tokens_neox': 324, 'n_words': 78}