import service from '@/utils/request'

// @Tags ProblemType
// @Summary 创建ProblemType
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProblemType true "创建ProblemType"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /problemType/createProblemType [post]
export const createProblemType = (data) => {
  return service({
    url: '/problemType/createProblemType',
    method: 'post',
    data
  })
}

// @Tags ProblemType
// @Summary 删除ProblemType
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProblemType true "删除ProblemType"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /problemType/deleteProblemType [delete]
export const deleteProblemType = (data) => {
  return service({
    url: '/problemType/deleteProblemType',
    method: 'delete',
    data
  })
}

// @Tags ProblemType
// @Summary 删除ProblemType
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除ProblemType"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /problemType/deleteProblemType [delete]
export const deleteProblemTypeByIds = (data) => {
  return service({
    url: '/problemType/deleteProblemTypeByIds',
    method: 'delete',
    data
  })
}

// @Tags ProblemType
// @Summary 更新ProblemType
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProblemType true "更新ProblemType"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /problemType/updateProblemType [put]
export const updateProblemType = (data) => {
  return service({
    url: '/problemType/updateProblemType',
    method: 'put',
    data
  })
}

// @Tags ProblemType
// @Summary 用id查询ProblemType
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.ProblemType true "用id查询ProblemType"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /problemType/findProblemType [get]
export const findProblemType = (params) => {
  return service({
    url: '/problemType/findProblemType',
    method: 'get',
    params
  })
}

// @Tags ProblemType
// @Summary 分页获取ProblemType列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取ProblemType列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /problemType/getProblemTypeList [get]
export const getProblemTypeList = (params) => {
  return service({
    url: '/problemType/getProblemTypeList',
    method: 'get',
    params
  })
}
