import { request } from 'umi';
import type { SubjectAndCourseNumberStatistics, TrainNumberBySubjectStatistics, CourseBrowseTimesStatistics } from './data';

export async function fakeChartData(): Promise<{ data: AnalysisData }> {
  return request('/api/fake_analysis_chart_data');
}

/** 主题数、课程数统计 */
export async function subjectAndCourseNumberStatistics(): Promise<{ data: SubjectAndCourseNumberStatistics }> {
  return request('/dsideal_yy/ypt/careerTraining/report/subjectAndCourseNumberStatistics');
}

/** 培训情况统计，按照主题统计关联培训的数量 */
export async function trainNumberBySubjectStatistics(): Promise<{ data: TrainNumberBySubjectStatistics }> {
  return request('/dsideal_yy/ypt/careerTraining/report/trainNumberBySubjectStatistics');
}

/** 课程浏览量统计 */
export async function courseBrowseTimesStatistics(): Promise<{ data: CourseBrowseTimesStatistics }> {
  return request('/dsideal_yy/ypt/careerTraining/report/courseBrowseTimesStatistics');
}
