// src/api/mes/padLockType/padLockType.ts
import request from '@/config/axios'

export interface PadLockTypeVO {
  lockTypeId?: number
  parentTypeId?: number
  lockTypeCode: string
  lockTypeName: string
  enableFlag?: string
  remark?: string
  createBy?: string
  createTime?: Date
  updateBy?: string
  updateTime?: Date
}

export interface PageParam {
  pageNo: number
  pageSize: number
  lockTypeCode?: string
  lockTypeName?: string
  enableFlag?: string
}

// 查询挂锁类型-列表
export const listpadLockTypeApi = async (params: PageParam) => {
  return await request.get({ url: '/iscs/lock-type/getLockTypePage', params })
}

// 获取挂锁类型详细信息
export const getpadLockTypeInfoAPI = async (id: number) => {
  return await request.get({
    url: '/iscs/lock-type/selectLockTypeById',
    params: { id }
  })
}

// 新增挂锁类型
export const addpadLockTypeApi = async (data: PadLockTypeVO) => {
  return await request.post({ url: '/iscs/lock-type/insertLockType', data })
}

// 修改挂锁类型信息
export const updatepadLockTypeApi = async (data: PadLockTypeVO) => {
  return await request.put({ url: '/iscs/lock-type/updateLockType', data })
}

// 删除挂锁类型信息
export const delpadLockTypeApi = async (ids: number) => {
  return await request.delete({
    url: '/iscs/lock-type/deleteLockTypeList?ids=' + ids,

  })
}
