import service from '@/utils/request'

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

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

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

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

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

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