import service from '@/utils/request'

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

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

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

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

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

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