/** * 课程资源类型 * @enum {string} */ export type CourseResourceType = "video" | "image" | "doc" | "ppt"; /** * 课程资源 * @interface */ export interface ICourseResource { id: number; resource_name: string; resource_size: number; resource_type: CourseResourceType; resource_url: string; allow_download: boolean; } /** * 课程小节 * @interface * @property {string} id - 章节的唯一标识符 * @property {string} title - 章节的标题 * @property {ICourseResource[]} resources - 章节中的资源数组 */ export interface ICourseSection { id: number; title: string; resources: ICourseResource[]; } /** * 课程章节 * @interface * @property {string} id - 章节的唯一标识符 * @property {string} title - 章节的标题 * @property {boolean} is_published - 指示章节是否已发布 * @property {ICourseSection[]} sections - 章节中的小节数组 * @property {[]} [detections] - 待定。 */ export interface ICourseChapter { id: number; title: string; is_published: boolean; sections: ICourseSection[]; detections?: []; } /** * 课程 * @interface */ export interface ICourse { id: number; courseName: string; profile: string; previewUrl: string | null; schoolName: string; teacherName: string; semester: string; status: number; created_at: Date; updated_at: Date; remark: string | null; }