import request from '@/utils/http'

/**
 * 游戏管理 API
 */
export default {
  list(params: Record<string, unknown>) {
    return request.get<Api.Common.ApiPage>({
      url: '/core/dice/game/DiceGame/index',
      params
    })
  },

  read(id: number | string) {
    return request.get<Api.Common.ApiData>({
      url: '/core/dice/game/DiceGame/read?id=' + id
    })
  },

  save(params: Record<string, unknown>) {
    return request.post({
      url: '/core/dice/game/DiceGame/save',
      data: params
    })
  },

  update(params: Record<string, unknown>) {
    return request.put({
      url: '/core/dice/game/DiceGame/update',
      data: params
    })
  },

  delete(params: Record<string, unknown>) {
    return request.del({
      url: '/core/dice/game/DiceGame/destroy',
      data: params
    })
  }
}
