import { request } from '../request'

/** 评委消费题目，表示用了该题目 */
export function updateCurrentQuestionUse(TeamGroupID: number) {
  return request<App.Service.Response>({
    url: `/Base/ActivityMain/UpdateCurrentQuestionUse?TeamGroupID=${TeamGroupID}`,
    method: 'post',
    data: { TeamGroupID },
  })
}

/** 评委对其进行打分 */
export function updateScore(data: { Id: number, ResultPotins: number, QuestionDetailID: number, QuestionId: number }[]) {
  return request<App.Service.Response>({
    url: `/Base/ActivityMain/UpdateTeamQuestionResultList`,
    method: 'post',
    data,
  })
}

/** 结束活动时候调用 */
export function endActivity(ActivityID: number) {
  return request<App.Service.Response>({
    url: `/Base/ActivityMain/AddOrUpdateActivity_Main_Total?ActivityID=${ActivityID}`,
    method: 'post',
    data: { ActivityID },
  })
}
