import request from '/@/utils/request';
import type { ProjectReviewPolicy, ProjectReviewPolicyPageReq } from './types';

/**
 * 分页查询投后评价策略
 * POST /admin/projectReviewPolicy/page
 */
export function fetchProjectReviewPolicyPage(query?: ProjectReviewPolicyPageReq) {
  return request({
    url: '/admin/projectReviewPolicy/page',
    method: 'post',
    data: query,
  });
}

/**
 * 添加投后评价策略
 * POST /admin/projectReviewPolicy/add
 */
export function addProjectReviewPolicy(data?: ProjectReviewPolicy) {
  return request({
    url: '/admin/projectReviewPolicy/add',
    method: 'post',
    data: data,
  });
}

/**
 * 修改投后评价策略
 * PUT /admin/projectReviewPolicy/update
 */
export function updateProjectReviewPolicy(data?: ProjectReviewPolicy) {
  return request({
    url: '/admin/projectReviewPolicy/update',
    method: 'put',
    data: data,
  });
}

/**
 * 删除投后评价策略
 * DELETE /admin/projectReviewPolicy/delete
 */
export function deleteProjectReviewPolicy(id?: string) {
  return request({
    url: '/admin/projectReviewPolicy/delete?id=' + id,
    method: 'delete'
  });
}