<commit_before>'use strict'

import { Schema } from 'mongoose'

import { connectionAPI, connectionDefault } from '../config'

const ClientSchema = new Schema({
  clientID: {
    type: String, required: true, unique: true, index: true
  },
  clientDomain: {
    type: String, index: true
  },
  name: {
    type: String, required: true
  },
  roles: [{type: String, required: true}],
  passwordAlgorithm: String,
  passwordHash: String,
  passwordSalt: String,
  certFingerprint: String,
  organization: String,
  location: String,
  softwareName: String,
  description: String,
  contactPerson: String,
  contactPersonEmail: String
})

// compile the Client Schema into a Model
export const ClientModelAPI = connectionAPI.model('Client', ClientSchema)
export const ClientModel = connectionDefault.model('Client', ClientSchema)<commit_msg>Format the client model schema<commit_after>'use strict'

import { Schema } from 'mongoose'

import { connectionAPI, connectionDefault } from '../config'

const ClientSchema = new Schema({
  clientID: {
    type: String,
    required: true,
    unique: true,
    index: true
  },
  clientDomain: {
    type: String,
    index: true
  },
  name: {
    type: String,
    required: true
  },
  roles: [{ type: String, required: true }],
  passwordAlgorithm: String,
  passwordHash: String,
  passwordSalt: String,
  certFingerprint: String,
  organization: String,
  location: String,
  softwareName: String,
  description: String,
  contactPerson: String,
  contactPersonEmail: String
})

export const ClientModelAPI = connectionAPI.model('Client', ClientSchema)
export const ClientModel = connectionDefault.model('Client', ClientSchema)
{'fraction_non_alphanumeric': 0.10759115361625822, 'fraction_numerical': 0.0, 'mean_word_length': 4.382636655948553, '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': '4471877', 'n_tokens_mistral': 476, 'n_tokens_neox': 476, 'n_words': 148}