@defikitdotnet/education-module-ai
Version:
AI Education Module using Agent Framework
31 lines (30 loc) • 918 B
TypeScript
import { BaseRepository } from "./BaseRepository";
import { Course } from "../models/Course";
import { SqliteAdapter } from "../database/SqliteAdapter";
export declare class CourseRepository extends BaseRepository<Course> {
constructor(dbAdapter: SqliteAdapter);
/**
* Create a new course
*/
create(data: Omit<Course, "id">): Promise<Course>;
/**
* Override toCamelCase to handle categories JSON
*/
protected toCamelCase(obj: Record<string, any>): any;
/**
* Update an existing course
*/
update(id: string, data: Partial<Course>): Promise<Course | null>;
/**
* Find courses by teacher ID
*/
findByTeacherId(teacherId: string): Promise<Course[]>;
/**
* Find public courses
*/
findPublicCourses(): Promise<Course[]>;
/**
* Find courses by category
*/
findByCategory(categoryId: string): Promise<Course[]>;
}