import axios from "@/axios";

export function getStudentDetail(id) {
    return axios.post('/student/detail', {
        studentId: id
    })
}

export function getStudentList(data) {
    return axios.post('/student/list', data)
}

export function addStudent(name, classId, gradeId, startDate) {
    return axios.post('/student/add', {
        name: name,
        classId: classId,
        gradeId: gradeId,
        createTime: startDate
    })
}

export function deleteStudent(id) {
    return axios.post('/student/delete', {
        studentId: id
    })
}

// 加一个最大响应时间 20 秒
export function getStudentStudyAnalyze(data) {
    return axios.post('/student/analyze', data, {
        timeout: 20000
    })
}

export function getStudentWordMastery(id) {
    return axios.post('/student/mastery/detail', {
        studentId: id
    })
}
