import request from '@/helpers/request';

export interface IMusicGroupQuitQueryPage {
  /** 审核状态 */
  status?: 'ING' | 'PASS' | 'REJECT';
  /** 页码 */
  page: number;
  /** 页容量 */
  rows: number;
  /** 搜索关键字 */
  search?: string;
}
/** 学校学员退团 分页查询 */
export const musicGroupQuitQueryPage = (data: IMusicGroupQuitQueryPage) => {
  return request.post('/api-web/schoolMusicGroupQuit/queryPage', { data });
};

/**
 * 获取退团详情
 * @param musicGroupQuitId 退团编号
 * @returns
 */
export const api_musicGroupQuitGetDetail = (musicGroupQuitId: string) => {
  return request.get('/api-web/schoolMusicGroupQuit/getDetail', {
    params: { musicGroupQuitId }
  });
};

/**
 * 退团审批通过
 * @param musicGroupQuitId
 * @param reason
 * @returns
 */
export const api_musicGroupQuitAuditPass = (
  musicGroupQuitId: number,
  reason: string
) => {
  return request.get(`/api-web/schoolMusicGroupQuit/auditPass`, {
    params: { musicGroupQuitId, reason }
  });
};

/**
 * 退团审批拒绝
 * @param musicGroupQuitId
 * @param reason
 * @returns
 */
export const api_musicGroupQuitAuditReject = (
  musicGroupQuitId: number,
  reason: string
) => {
  return request.get('/api-web/schoolMusicGroupQuit/auditReject', {
    params: { musicGroupQuitId, reason }
  });
};
