feat: change scoring strategy
This commit is contained in:
@@ -12,6 +12,7 @@ import { QuestionType } from '../enums/question-type.enum';
|
||||
import type { QuestionMetadata } from '../types/question-metadata.type';
|
||||
import { Choice } from './choice.entity';
|
||||
import { UNIQUE_TEST_ORDER_IDX } from '../constants';
|
||||
import { QuestionRangeRule } from './question-range-rule.entity';
|
||||
|
||||
@Entity()
|
||||
@Index(UNIQUE_TEST_ORDER_IDX, ['test', 'order'], { unique: true })
|
||||
@@ -37,9 +38,15 @@ export class Question {
|
||||
@Column({ type: 'int', nullable: false })
|
||||
order!: number;
|
||||
|
||||
@Column({ type: 'int', default: 1 })
|
||||
weight!: number;
|
||||
|
||||
@Column({ type: 'boolean', default: true })
|
||||
required!: boolean;
|
||||
|
||||
@OneToMany(() => QuestionRangeRule, (rangeRule) => rangeRule.question)
|
||||
rangeRules?: Array<QuestionRangeRule>;
|
||||
|
||||
@Column({ type: 'jsonb', nullable: true })
|
||||
metadata!: QuestionMetadata;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user