forked from hangshuo652/aurak
fix: 代码整合修复 - Entity类型、题库生成、评估流程等14项修复
This commit is contained in:
@@ -14,7 +14,7 @@ export class AssessmentAnswer {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ name: 'question_id' })
|
||||
@Column({ name: 'question_id', type: 'text' })
|
||||
questionId: string;
|
||||
|
||||
@ManyToOne(
|
||||
|
||||
@@ -13,26 +13,26 @@ export class AssessmentCertificate {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ name: 'user_id' })
|
||||
@Column({ name: 'user_id', type: 'text' })
|
||||
userId: string;
|
||||
|
||||
@ManyToOne(() => User)
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
user: User;
|
||||
|
||||
@Column({ name: 'session_id' })
|
||||
@Column({ name: 'session_id', type: 'text' })
|
||||
sessionId: string;
|
||||
|
||||
@Column({ name: 'template_id' })
|
||||
@Column({ name: 'template_id', type: 'text' })
|
||||
templateId: string;
|
||||
|
||||
@Column()
|
||||
@Column({ type: 'text' })
|
||||
level: string;
|
||||
|
||||
@Column({ type: 'float', name: 'total_score' })
|
||||
totalScore: number;
|
||||
|
||||
@Column({ name: 'qr_code', nullable: true })
|
||||
@Column({ name: 'qr_code', nullable: true, type: 'text' })
|
||||
qrCode: string;
|
||||
|
||||
@Column({ name: 'dimension_scores', type: 'simple-json', nullable: true })
|
||||
|
||||
@@ -16,7 +16,7 @@ export class AssessmentQuestion {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ name: 'session_id' })
|
||||
@Column({ name: 'session_id', type: 'text' })
|
||||
sessionId: string;
|
||||
|
||||
@ManyToOne(
|
||||
|
||||
@@ -24,31 +24,31 @@ export class AssessmentSession {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ name: 'user_id' })
|
||||
@Column({ name: 'user_id', type: 'text' })
|
||||
userId: string;
|
||||
|
||||
@ManyToOne(() => User)
|
||||
@JoinColumn({ name: 'user_id' })
|
||||
user: User;
|
||||
|
||||
@Column({ name: 'tenant_id', nullable: true })
|
||||
@Column({ name: 'tenant_id', nullable: true, type: 'text' })
|
||||
tenantId: string;
|
||||
|
||||
@Column({ name: 'knowledge_base_id', nullable: true })
|
||||
@Column({ name: 'knowledge_base_id', nullable: true, type: 'text' })
|
||||
knowledgeBaseId: string | null;
|
||||
|
||||
@ManyToOne(() => KnowledgeBase, { nullable: true })
|
||||
@JoinColumn({ name: 'knowledge_base_id' })
|
||||
knowledgeBase: KnowledgeBase;
|
||||
|
||||
@Column({ name: 'knowledge_group_id', nullable: true })
|
||||
@Column({ name: 'knowledge_group_id', nullable: true, type: 'text' })
|
||||
knowledgeGroupId: string | null;
|
||||
|
||||
@ManyToOne(() => KnowledgeGroup, { nullable: true })
|
||||
@JoinColumn({ name: 'knowledge_group_id' })
|
||||
knowledgeGroup: KnowledgeGroup;
|
||||
|
||||
@Column({ name: 'thread_id', nullable: true })
|
||||
@Column({ name: 'thread_id', nullable: true, type: 'text' })
|
||||
threadId: string;
|
||||
|
||||
@Column({
|
||||
@@ -85,6 +85,18 @@ export class AssessmentSession {
|
||||
@Column({ type: 'simple-json', name: 'review_history', nullable: true })
|
||||
reviewHistory: any[];
|
||||
|
||||
@Column({ name: 'started_at', nullable: true, type: 'datetime' })
|
||||
startedAt: Date | null;
|
||||
|
||||
@Column({ name: 'current_question_started_at', nullable: true, type: 'datetime' })
|
||||
currentQuestionStartedAt: Date | null;
|
||||
|
||||
@Column({ type: 'int', name: 'total_time_limit', default: 1800 })
|
||||
totalTimeLimit: number;
|
||||
|
||||
@Column({ type: 'int', name: 'per_question_time_limit', default: 300 })
|
||||
perQuestionTimeLimit: number;
|
||||
|
||||
@Column({ type: 'int', name: 'current_question_index', default: 0 })
|
||||
currentQuestionIndex: number;
|
||||
|
||||
@@ -97,7 +109,7 @@ export class AssessmentSession {
|
||||
@Column({ type: 'varchar', length: 10, default: 'zh' })
|
||||
language: string;
|
||||
|
||||
@Column({ name: 'template_id', nullable: true })
|
||||
@Column({ name: 'template_id', nullable: true, type: 'text' })
|
||||
templateId: string;
|
||||
|
||||
@ManyToOne(() => AssessmentTemplate, { nullable: true })
|
||||
|
||||
@@ -97,6 +97,12 @@ export class AssessmentTemplate {
|
||||
@Column({ type: 'int', name: 'passing_score', default: 90 })
|
||||
passingScore: number;
|
||||
|
||||
@Column({ type: 'int', name: 'total_time_limit', default: 1800 })
|
||||
totalTimeLimit: number;
|
||||
|
||||
@Column({ type: 'int', name: 'per_question_time_limit', default: 300 })
|
||||
perQuestionTimeLimit: number;
|
||||
|
||||
@CreateDateColumn({ name: 'created_at' })
|
||||
createdAt: Date;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user