
import request from '@/config/axios'

export interface jobVO {
  id: number,
  ticketId: number,
  groupId: number,
  userId: number,
  userName: string,
  userType: number,
  userRole: string,
  jobStatus: number,
  remark: string
}

export interface PageParam {
  pageNo: number
  pageSize: number
  userName?: string
  userType?: string
  groupId?: string
  ticketId: number,
}

// 查询Job用户列表
export const getJobTicketUserPage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/job-ticket-user/getJobTicketUserPage', params })
}

// 获取Job用户详细信息
export const selectJobTicketUserById = async (id: number) => {
  return await request.get({ url: '/iscs/job-ticket-user/selectJobTicketUserById', params: { id: id } })
}

// 新增Job 用户
export const insertJobTicketUser = async (data: jobVO) => {
  return await request.post({ url: '/iscs/job-ticket-user/insertJobTicketUser', data })
}
// 修改Job用户
export const updateJobTicketUser = async (data: jobVO) => {
  return await request.put({ url: '/iscs/job-ticket-user/updateJobTicketUser', data })
}

// 删除Job用户
export const deleteJobTicketUserList = async (ids: number) => {
  return await request.delete({
    url: '/iscs/job-ticket-user/deleteJobTicketUserList?ids='+ids,
  })
}
