/**
 * 赛事信息API接口
 */

import request from '@/utils/request.js'

export default {
  /**
   * 获取信息发布列表
   * @param {Object} params 查询参数 { competitionId, current, size }
   * @returns {Promise}
   */
  getInfoPublishList(params = {}) {
    return request.get('/martial/infoPublish/list', {
      current: params.current || 1,
      size: params.size || 10,
      ...params
    })
  },

  /**
   * 获取信息详情
   * @param {String|Number} id 信息ID
   * @returns {Promise}
   */
  getInfoPublishDetail(id) {
    return request.get('/martial/infoPublish/detail', { id })
  },

  /**
   * 获取活动日程列表
   * @param {Object} params 查询参数 { competitionId, current, size }
   * @returns {Promise}
   */
  getActivityScheduleList(params = {}) {
    return request.get('/martial/activitySchedule/list', {
      current: params.current || 1,
      size: params.size || 100,
      ...params
    })
  },

  /**
   * 获取日程详情
   * @param {String|Number} id 日程ID
   * @returns {Promise}
   */
  getActivityScheduleDetail(id) {
    return request.get('/martial/activitySchedule/detail', { id })
  },

  /**
   * 获取赛程安排（出场顺序）列表
   * @param {Object} params 查询参数 { competitionId, current, size }
   * @returns {Promise}
   */
  getScheduleList(params = {}) {
    return request.get('/martial/schedule/list', {
      current: params.current || 1,
      size: params.size || 100,
      ...params
    })
  },

  /**
   * 获取赛程详情
   * @param {String|Number} id 赛程ID
   * @returns {Promise}
   */
  getScheduleDetail(id) {
    return request.get('/martial/schedule/detail', { id })
  },

  /**
   * 获取比赛实况列表
   * @param {Object} params 查询参数 { competitionId, current, size }
   * @returns {Promise}
   */
  getLiveUpdateList(params = {}) {
    return request.get('/martial/liveUpdate/list', {
      current: params.current || 1,
      size: params.size || 20,
      ...params
    })
  },

  /**
   * 获取实况详情
   * @param {String|Number} id 实况ID
   * @returns {Promise}
   */
  getLiveUpdateDetail(id) {
    return request.get('/martial/liveUpdate/detail', { id })
  }
}
