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:
@@ -0,0 +1,35 @@
|
||||
import { DataSource } from 'typeorm';
|
||||
import { User } from './user/user.entity';
|
||||
// import { UserSetting } from './user-setting/user-setting.entity';
|
||||
import { ModelConfig } from './model-config/model-config.entity';
|
||||
import { KnowledgeBase } from './knowledge-base/knowledge-base.entity';
|
||||
import { KnowledgeGroup } from './knowledge-group/knowledge-group.entity';
|
||||
import { SearchHistory } from './search-history/search-history.entity';
|
||||
import { ChatMessage } from './search-history/chat-message.entity';
|
||||
import { Note } from './note/note.entity';
|
||||
import { PodcastEpisode } from './podcasts/entities/podcast-episode.entity';
|
||||
import { ImportTask } from './import-task/import-task.entity';
|
||||
import { Tenant } from './tenant/tenant.entity';
|
||||
import { TenantSetting } from './tenant/tenant-setting.entity';
|
||||
|
||||
export const AppDataSource = new DataSource({
|
||||
type: 'better-sqlite3',
|
||||
database: './data/knowledge-base.db',
|
||||
synchronize: false,
|
||||
logging: true,
|
||||
entities: [
|
||||
User,
|
||||
// UserSetting,
|
||||
ModelConfig,
|
||||
KnowledgeBase,
|
||||
KnowledgeGroup,
|
||||
SearchHistory,
|
||||
ChatMessage,
|
||||
Note,
|
||||
PodcastEpisode,
|
||||
ImportTask,
|
||||
Tenant,
|
||||
TenantSetting,
|
||||
],
|
||||
migrations: ['src/migrations/**/*.ts'],
|
||||
});
|
||||
Reference in New Issue
Block a user