feat: 考核系统升级 P0+P1+P2 — 体验/题库/配置增强
P0 — 答题体验优化: - 题序导航点:题目进度可视化,标记题目标记 - 标记回头检查: 点击🏷️按钮标记当前题,导航点变黄色 - 提交确认弹窗: 未答完时提交弹出确认对话框 P1 — 题库管理增强: - QuestionBankItem 新增 tags 字段(多标签过滤) - 新增 question_bank_templates 联表(题库跨模板复用) P2 — 考试配置增强: - AssessmentTemplate 新增字段: - attemptLimit (尝试次数限制) - scheduledStart/scheduledEnd (预约时段) - reviewMode (回顾模式: none/after_completion/per_question) - shuffleQuestions (每题随机排序) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
import { QuestionBank } from './question-bank.entity';
|
||||
import { AssessmentTemplate } from './assessment-template.entity';
|
||||
|
||||
/**
|
||||
* P1: Join table for QuestionBank <-> AssessmentTemplate many-to-many
|
||||
* Allows one question bank to be used across multiple templates.
|
||||
*/
|
||||
@Entity('question_bank_templates')
|
||||
export class QuestionBankTemplate {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ name: 'bank_id' })
|
||||
bankId: string;
|
||||
|
||||
@ManyToOne(() => QuestionBank, (bank) => bank.id, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'bank_id' })
|
||||
bank: QuestionBank;
|
||||
|
||||
@Column({ name: 'template_id' })
|
||||
templateId: string;
|
||||
|
||||
@ManyToOne(() => AssessmentTemplate, (tpl) => tpl.id, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'template_id' })
|
||||
template: AssessmentTemplate;
|
||||
|
||||
@CreateDateColumn({ name: 'created_at' })
|
||||
createdAt: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user