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
+12
View File
@@ -0,0 +1,12 @@
const sqlite3 = require('better-sqlite3');
const db = new sqlite3('./data/metadata.db');
const tableInfo = db.prepare("PRAGMA table_info(model_configs)").all();
console.log("Table info for model_configs:");
console.log(JSON.stringify(tableInfo, null, 2));
const sample = db.prepare("SELECT * FROM model_configs LIMIT 5").all();
console.log("Sample data:");
console.log(JSON.stringify(sample, null, 2));
db.close();