import request from '@/config/axios'

// 定义工单数据类型
export interface WorkOrder {
  id: number
  code: string
  productId: number
  productCode: string
  productName: string
  status: number
  createTime?: string
  updateTime?: string
}

// 获取工单列表
export const getWorkOrderList = (params?: { status?: number }): Promise<WorkOrder[]> => {
  return request.get({
    url: '/mes/work-order/list',
    params
  })
}
