@defikitdotnet/education-module-ai
Version:
AI Education Module using Agent Framework
38 lines (37 loc) • 1.01 kB
TypeScript
import { Section } from "../models/Section";
import { SectionRepository } from "../repositories/SectionRepository";
export interface CreateSectionDTO {
courseId: string;
title: string;
description?: string;
orderIndex?: number;
}
export interface UpdateSectionDTO {
title?: string;
description?: string;
orderIndex?: number;
}
export declare class SectionService {
private sectionRepository;
constructor(sectionRepository: SectionRepository);
/**
* Create a new section
*/
createSection(data: CreateSectionDTO): Promise<Section>;
/**
* Get a section by ID
*/
getSection(id: string): Promise<Section | null>;
/**
* Get all sections for a course
*/
getSectionsByCourseId(courseId: string): Promise<Section[]>;
/**
* Update a section
*/
updateSection(id: string, data: UpdateSectionDTO): Promise<Section | null>;
/**
* Delete a section
*/
deleteSection(id: string): Promise<boolean>;
}