feat: implement QuestionBank CRUD with pagination and template query

- Add pagination support to findAll (page, limit query params)
- Add findByTemplateId method to service
- Add GET /by-template/:templateId endpoint to controller
- Service already includes CRUD for QuestionBank and QuestionBankItem
This commit is contained in:
Developer
2026-04-23 17:19:11 +08:00
commit 0a9588abb7
492 changed files with 112453 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
/**
* Vision Service Interface Definitions
*/
export interface VisionAnalysisResult {
text: string; // Extracted text content
images: ImageDescription[]; // Image description
layout: string; // Layout type
confidence: number; // Confidence (0-1)
pageIndex?: number; // Page number
}
export interface ImageDescription {
type: string; // Image type (chart/diagram/flowchart etc.)
description: string; // Detailed description
position?: number; // Position in page
}
export interface VisionModelConfig {
baseUrl: string;
apiKey: string;
modelId: string;
}
export interface BatchAnalysisResult {
results: VisionAnalysisResult[];
totalPages: number;
successCount: number;
failedCount: number;
estimatedCost: number; // Estimated cost(USD)
}
export interface PageQuality {
isGood: boolean;
reason?: string;
score?: number;
}