import request from '/@/utils/request';

/**
 * 分页查询德育计划列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/moralplan/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增德育计划
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/moralplan',
    method: 'post',
    data
  });
};

/**
 * 获取详情
 * @param id
 */
export const getDetail = (id: string) => {
  return request({
    url: '/stuwork/moralplan/detail',
    method: 'get',
    params: { id }
  });
};

/**
 * 编辑德育计划
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/moralplan/edit',
    method: 'post',
    data
  });
};

/**
 * 删除德育计划
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/moralplan/delete',
    method: 'post',
    data: ids
  });
};
