fix: update home page background image and remove unnecessary redirect code chore: update pnpm lock file with new dependencies for auto-animate and svg spinners delete: remove unused images from public directory refactor: modify course and user types for better clarity and structure feat: implement course API with CRUD operations and teacher team management feat: create user authentication page with login functionality and validation feat: add login state management with Pinia for user session handling style: create reusable UI components for cards and tabs chore: implement HTTP utility for API requests with error handling
67 lines
1.4 KiB
TypeScript
67 lines
1.4 KiB
TypeScript
/**
|
|
* 课程资源类型
|
|
* @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;
|
|
}
|