UNPKG

@defikitdotnet/education-module-ai

Version:
35 lines (34 loc) 1.25 kB
import { BaseRepository } from "./BaseRepository"; import { Progress } from "../models/Progress"; import { SqliteAdapter } from "../database/SqliteAdapter"; export declare class ProgressRepository extends BaseRepository<Progress> { constructor(dbAdapter: SqliteAdapter); /** * Create a new progress record */ create(data: Omit<Progress, "id">): Promise<Progress>; /** * Update an existing progress record */ update(id: string, data: Partial<Progress>): Promise<Progress | null>; /** * Find progress records by student ID */ findByStudentId(studentId: string): Promise<Progress[]>; /** * Find progress records by lecture ID */ findByLectureId(lectureId: string): Promise<Progress[]>; /** * Find progress record by student ID and lecture ID */ findByStudentAndLecture(studentId: string, lectureId: string): Promise<Progress | null>; /** * Mark a lecture as completed for a student */ markLectureCompleted(studentId: string, lectureId: string): Promise<boolean>; /** * Find all completed lectures for a student in a course */ findCompletedLecturesForStudentInCourse(studentId: string, courseId: string): Promise<string[]>; }