import { http } from '@/utils/http/axios';

/** 得分信息 */
export type ScoreType = {
  /** 日期 */
  date: string;
  /** 得分 */
  score: number;
  /** 创建时间 */
  workshopList: Array<string>;
};

/** 根据用户权限查询场景树 */
export const getDailyScore = () => {
  return http.request<ScoreType[]>({
    url: '/dataPreview/getDailyScore',
    method: 'get',
  });
};

export const getWeeklyScore = () => {
  return http.request<ScoreType[]>({
    url: '/dataPreview/getWeeklyScore',
    method: 'get',
  });
};

export const getMonthlyScore = () => {
  return http.request<ScoreType[]>({
    url: '/dataPreview/getMonthlyScore',
    method: 'get',
  });
};

export const getQuarterlyScore = () => {
  return http.request<ScoreType[]>({
    url: '/dataPreview/getQuarterlyScore',
    method: 'get',
  });
};
