選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

aspect.js 527B

123456789101112131415161718
  1. const Schwifty = require('@hapipal/schwifty')
  2. const Joi = require('joi')
  3. const config = require('../../db/data-generator/config.json')
  4. const aspects = { aspect_id: Joi.number() }
  5. const possible_combinations = Math.pow(config.scoreVals.length, 2)
  6. for(let i = 1; i <= possible_combinations; i++) {
  7. aspects[i] = Joi.number()
  8. }
  9. module.exports = class Aspect extends Schwifty.Model {
  10. static get tableName() {
  11. return 'prescored_aspects'
  12. }
  13. static get joiSchema() {
  14. return Joi.object(aspects)
  15. }
  16. }