@defikitdotnet/education-module-ai
Version:
AI Education Module using Agent Framework
34 lines (33 loc) • 1.35 kB
TypeScript
import { BaseRepository } from "./BaseRepository";
import { Enrollment } from "../models/Enrollment";
import { SqliteAdapter } from "../database/SqliteAdapter";
export declare class EnrollmentRepository extends BaseRepository<Enrollment> {
constructor(dbAdapter: SqliteAdapter);
/**
* Create a new enrollment
*/
create(data: Omit<Enrollment, "id">): Promise<Enrollment>;
/**
* Update an existing enrollment
*/
update(id: string, data: Partial<Enrollment>): Promise<Enrollment | null>;
/**
* Find enrollments by student ID
*/
findByStudentId(studentId: string): Promise<Enrollment[]>;
/**
* Find enrollments by course ID
*/
findByCourseId(courseId: string): Promise<Enrollment[]>;
/**
* Find enrollment by student ID and course ID
*/
findByStudentAndCourse(studentId: string, courseId: string): Promise<Enrollment | null>;
/**
* Update progress for a student's enrollment in a course
*/
updateProgress(studentId: string, courseId: string, progress: number, completed?: boolean): Promise<boolean>;
findAllByStudentId(studentId: string): Promise<Enrollment[]>;
markLectureCompleted(studentId: string, courseId: string, lectureId: string): Promise<void>;
getCompletedLectures(studentId: string, courseId: string): Promise<number[]>;
}