import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { RfidinfoForm, RfidinfoId, RfidinfoIds, RfidinfoQuery, RfidinfoVO } from './types';

export const listRfidinfo = (query?: RfidinfoQuery): AxiosPromise<RfidinfoVO[]> => {
  return request({ url: '/wcs/rfidinfo/list', method: 'get', params: query });
};

export const getRfidinfo = (configId: RfidinfoId): AxiosPromise<RfidinfoVO> => {
  return request({ url: '/wcs/rfidinfo/' + configId, method: 'get' });
};

export const addRfidinfo = (data: RfidinfoForm) => {
  return request({ url: '/wcs/rfidinfo', method: 'post', data });
};

export const updateRfidinfo = (data: RfidinfoForm) => {
  return request({ url: '/wcs/rfidinfo', method: 'put', data });
};

export const delRfidinfo = (configId: RfidinfoId | RfidinfoIds) => {
  return request({ url: '/wcs/rfidinfo/' + configId, method: 'delete' });
};
