import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { PartnerQualificationVO, PartnerQualificationForm, PartnerQualificationQuery } from './types';

export function listPartnerQualification(query: PartnerQualificationQuery): AxiosPromise<PartnerQualificationVO[]> {
  return request({
    url: '/customer/partnerQualification/list',
    method: 'get',
    params: query
  });
}

export function getPartnerQualification(id: string | number): AxiosPromise<PartnerQualificationVO> {
  return request({
    url: '/customer/partnerQualification/' + id,
    method: 'get'
  });
}

export function addPartnerQualification(data: PartnerQualificationForm) {
  return request({
    url: '/customer/partnerQualification',
    method: 'post',
    data: data
  });
}

export function updatePartnerQualification(data: PartnerQualificationForm) {
  return request({
    url: '/customer/partnerQualification',
    method: 'put',
    data: data
  });
}

export function delPartnerQualification(ids: string | number | Array<string | number>) {
  return request({
    url: '/customer/partnerQualification/' + ids,
    method: 'delete'
  });
}
