import request from '@/config/axios'

export interface RfidTokenVO {
  rfidId?: number
  rfidCode: string
  rfidName: string
  enableFlag?: string
  remark?: string
  createBy?: string
  createTime?: Date
  updateBy?: string
  updateTime?: Date
}

export interface PageParam {
  pageNo: number
  pageSize: number
  rfidCode?: string
  rfidName?: string
  enableFlag?: string
}

// 查询锁控机柜-列表
export const getIsRfidTokenPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/rfid-token/getRfidTokenPage', params })
}

// 获取锁控机柜详细信息
export const selectIsRfidTokenById = async (id: number) => {
  return await request.get({
    url: '/iscs/rfid-token/selectRfidTokenById',
    params: { id }
  })
}

// 新增锁控机柜
export const insertIsRfidToken = async (data: RfidTokenVO) => {
  return await request.post({ url: '/iscs/rfid-token/insertRfidToken', data })
}

// 修改锁控机柜信息
export const updateIsRfidToken = async (data: RfidTokenVO) => {
  return await request.put({ url: '/iscs/rfid-token/updateRfidToken', data })
}

// 删除锁控机柜信息
export const deleteIsRfidTokenByRfidIds = async (ids: number) => {
  return await request.delete({
    url: '/iscs/rfid-token/deleteRfidTokenList?ids='+ids,

  })
}
