import type {IUser} from "@/types/user";
import {dayjs} from "element-plus";

export interface engagementVO {
    "id": number,
    "assignmentId": number,
    "studentId": number,
    "score": number,
    "remark": string,
    "fileUrl": string,
    "version": number,
    "status": string,
    "fileKey": string,
    "quillContent": string,
    "textContent": string,
    "htmlContent": string,
}

export interface engagementDetailVO {
    "id": number,
    "assignmentVO": IAssignment,
    "userVO": IUser,
    "score": number|null,
    "remark": string|null,
    "fileUrl": string,
    "version": number,
    "status": string,
    "fileKey": string,
    "quillContent": string,
    "textContent": string,
    "htmlContent": string,
}

export interface IAssignment {
    assignmentId: number;

    assignmentName: string;

    description: string;

    type:string;

    descriptionFile: string|null; // 作业要求，Word/Pdf文件

    attachments: string[]|null; // 作业附件

    teacherId: number; // 发布作业的老师的Id

    teacherName: string; // 发布作业的老师的姓名

    courseId: number; // 哪个课程下的assignment

    startTime: string;

    endTime: string;

    createTime: string;

    status: string;
}

export interface AssignmentVO {
    assignmentId: number;

    assignmentName: string;

    description: string;

    type:string;

    descriptionFile: string|null; // 作业要求，Word/Pdf文件

    attachments: string[]|null; // 作业附件

    teacherId: number; // 发布作业的老师的Id

    courseId: number; // 哪个课程下的assignment

    startTime: string;

    endTime: string;

    createTime: string;

    status: string;
}

export interface IAssignmentTableColumn {
    title: string;
    dataIndex: 'desc' |'type' | 'publisher' | 'startDate' | 'endDate' | 'details' | 'writing' | 'assignmentId' | 'teacherId';
    key: 'desc' | 'type' | 'publisher' | 'startDate' | 'endDate' | 'details' | 'writing' | 'assignmentId' | 'teacherId';
    width: number
}

export interface IAssignmentTableItem {
    desc: string;
    type:string;
    publisher: string;
    startDate: string;
    endDate: string;
    assignmentId: number;
    descriptionFile?: string;
    teacherId: string
}


export interface ITranslationVO {
    queryText: string;

    queryResult: string;

    targetLanguage: string; // 目标语言类型

    queryTime: string;
}

export interface CourseVO {
    courseId: number;
    courseName: string;
    teacherIds: number[];
    teacherNames: string[];
    courseImages: string[];
    targetGrade: string;
    startTime: string;
    endTime: string;
    createTime: string;
    description: string;
}

export interface CourseDetailVO {
    courseId: number;
    courseName: string;
    teacherIds: number[];
    teacherNames: string[];
    courseImages: string[];
    targetGrade: string;
    startTime: string;
    endTime: string;
    createTime: string;
    description: string;
}

// 新增：学生作业状态接口
export interface StudentAssignmentStatus {
    assignmentId: number;
    assignmentName: string;
    status: 'CORRECTED' | 'SUBMITTED' | 'NOT_SUBMITTED'|'LATE_SUBMITTED_CORRECTED'|'LATE_SUBMITTED';
    score: number;
}

// 新增：学生课程作业响应接口
export interface StudentCourseAssignmentsResponse {
    studentId: number;
    officialNumber: string;
    stuName: string;
    assignments: StudentAssignmentStatus[];
}

export interface ClassVO {
    classId: number;
    className: string;
    classTime: string;
    teacherId: number;
    courseId: number;
    stuNumber: number;
    classCode: number;
}

export interface ClassStudentVO {
    officialNumber: number;
    stuName: string;
    stateCode: number;
    stateDesc: string;
    studentId: number;
}