add changes
This commit is contained in:
@@ -1,5 +1,42 @@
|
||||
import { Category } from './category.model';
|
||||
import { Question } from './question.model';
|
||||
|
||||
export interface QuizSessionHistory {
|
||||
|
||||
"time": {
|
||||
"spent": number,
|
||||
"limit": number | null,
|
||||
"percentage": number
|
||||
},
|
||||
"createdAt": "2025-12-19T18:49:58.000Z"
|
||||
id: string;
|
||||
|
||||
category?: {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
icon: string;
|
||||
color: string;
|
||||
};
|
||||
quizType: QuizType;
|
||||
difficulty: string;
|
||||
questions: {
|
||||
answered: number,
|
||||
total: number,
|
||||
correct: number,
|
||||
accuracy: number
|
||||
};
|
||||
score: {
|
||||
earned: number
|
||||
total: number
|
||||
percentage: number
|
||||
};
|
||||
|
||||
status: QuizStatus;
|
||||
startedAt: string;
|
||||
completedAt?: string;
|
||||
isPassed?: boolean;
|
||||
}
|
||||
/**
|
||||
* Quiz Session Interface
|
||||
* Represents an active or completed quiz session
|
||||
@@ -40,6 +77,16 @@ export type QuizStatus = 'in_progress' | 'completed' | 'abandoned';
|
||||
* Quiz Start Request
|
||||
*/
|
||||
export interface QuizStartRequest {
|
||||
success: true;
|
||||
data: {
|
||||
categoryId: string;
|
||||
questionCount: number;
|
||||
difficulty?: string; // 'easy', 'medium', 'hard', 'mixed'
|
||||
quizType?: QuizType;
|
||||
};
|
||||
}
|
||||
export interface QuizStartFormRequest {
|
||||
|
||||
categoryId: string;
|
||||
questionCount: number;
|
||||
difficulty?: string; // 'easy', 'medium', 'hard', 'mixed'
|
||||
@@ -51,10 +98,12 @@ export interface QuizStartRequest {
|
||||
*/
|
||||
export interface QuizStartResponse {
|
||||
success: boolean;
|
||||
sessionId: string;
|
||||
questions: Question[];
|
||||
totalQuestions: number;
|
||||
message?: string;
|
||||
data: {
|
||||
sessionId: string;
|
||||
questions: Question[];
|
||||
totalQuestions: number;
|
||||
message?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user