import { defHttp } from '@/utils/http/axios';
import { ID, IDS, commonExport } from '@/api/base';
import { VidiconInfoVO, VidiconInfoForm, VidiconInfoQuery } from './model';

/**
 * 查询网络摄像机信息;列表
 * @param params
 * @returns
 */
export function vidiconInfoList(params?: VidiconInfoQuery) {
  return defHttp.get<VidiconInfoVO[]>({ url: '/vidicon/vidiconInfo/list', params });
}

/**
 * 导出网络摄像机信息;列表
 * @param params
 * @returns
 */
export function vidiconInfoExport(params?: VidiconInfoQuery) {
  return commonExport('/vidicon/vidiconInfo/export', params ?? {});
}

/**
 * 查询网络摄像机信息;详细
 * @param id id
 * @returns
 */
export function vidiconInfoInfo(id: ID) {
  return defHttp.get<VidiconInfoVO>({ url: '/vidicon/vidiconInfo/' + id });
}

/**
 * 新增网络摄像机信息;
 * @param data
 * @returns
 */
export function vidiconInfoAdd(data: VidiconInfoForm) {
  return defHttp.postWithMsg<void>({ url: '/vidicon/vidiconInfo', data });
}

/**
 * 更新网络摄像机信息;
 * @param data
 * @returns
 */
export function vidiconInfoUpdate(data: VidiconInfoForm) {
  return defHttp.putWithMsg<void>({ url: '/vidicon/vidiconInfo', data });
}

/**
 * 删除网络摄像机信息;
 * @param id id
 * @returns
 */
export function vidiconInfoRemove(id: ID | IDS) {
  return defHttp.deleteWithMsg<void>({ url: '/vidicon/vidiconInfo/' + id });
}
