import service from '@/utils/request'

// @Summary 获取列表
// @Produce  application/json
// @Router /cms/entrepreneur/getList [post]
export const getEntrepreneurList = (data) => {
  return service({
    url: '/cms/entrepreneur/getList',
    method: 'post',
    data
  })
}

// @Summary 新增
// @Produce  application/json
// @Param Object
// @Router /cms/entrepreneur/add [post]
export const addEntrepreneur = (data) => {
  return service({
    url: '/cms/entrepreneur/add',
    method: 'post',
    data
  })
}

// @Summary 删除
// @Produce  application/json
// @Param ID int
// @Router /cms/entrepreneur/delete [delete]
export const deleteEntrepreneur = (data) => {
  return service({
    url: '/cms/entrepreneur/delete',
    method: 'delete',
    data
  })
}

// @Summary 批量删除
// @Param data body request.IdsReq true "批量删除"
// @Router /cms/entrepreneur/deleteByIds [delete]
export const deleteEntrepreneurByIds = (params) => {
  return service({
    url: '/cms/entrepreneur/deleteByIds',
    method: 'delete',
    params
  })
}

// @Summary 修改
// @Produce  application/json
// @Param Object
// @Router /cms/entrepreneur/update [put]
export const updateEntrepreneur = (data) => {
  return service({
    url: '/cms/entrepreneur/update',
    method: 'put',
    data
  })
}

// @Summary 根据id获取
// @Param data body api.GetById true "根据id获取"
// @Router /cms/entrepreneur/get [get]
export const getEntrepreneurById = (params) => {
  return service({
    url: '/cms/entrepreneur/get',
    method: 'get',
    params
  })
}
