import { request } from '@@/plugin-request/request';
import { stringify } from 'qs';

/**
 * 查询红外品牌数据
 * @param param
 */
export async function queryInfraredBrands(param: object) {
  return request(`/web/v1/infrared_brands?${stringify(param)}`);
}

/**
 * 删除红外品牌
 * @param record_id
 */
export async function delInfraredBrands(record_id: any) {
  return request(`/web/v1/infrared_brands/${record_id}`, {
    method: 'DELETE',
  });
}

/**
 * 新增品牌
 * @param params
 */
export async function createInfraredBrands(params: object) {
  return request(`/web/v1/infrared_brands`, {
    method: 'POST',
    data: params,
  });
}

/**
 * 编辑品牌
 * @param params
 */
export async function updateInfraredBrands(params: { record_id: string }) {
  return request(`/web/v1/infrared_brands/${params.record_id}`, {
    method: 'PUT',
    data: params,
  });
}
