UNPKG

@defikitdotnet/education-module-ai

Version:
31 lines (30 loc) 966 B
import { BaseRepository } from "./BaseRepository"; import { Category } from "../models/Category"; import { SqliteAdapter } from "../database/SqliteAdapter"; export declare class CategoryRepository extends BaseRepository<Category> { constructor(dbAdapter: SqliteAdapter); /** * Create a new category */ create(data: Omit<Category, "id">): Promise<Category>; /** * Update an existing category */ update(id: string, data: Partial<Category>): Promise<Category | null>; /** * Find categories by teacher ID */ findByTeacherId(teacherId: string): Promise<Category[]>; /** * Get all categories with pagination */ findAllPaginated(page?: number, limit?: number): Promise<Category[]>; /** * Find a category by name (case insensitive) */ findByName(name: string): Promise<Category | null>; /** * Get total count of categories */ getTotalCount(): Promise<number>; }