import type { TableColumnData } from '@arco-design/web-vue/es/table/interface'

export const columns: TableColumnData[] = [
  {
    title: '序号',
    dataIndex: 'index',
    slotName: 'index',
    width: 80,
  },
  {
    title: '工单编号',
    dataIndex: 'ticket_no',
    width: 160,
  },
  {
    title: '工单标题',
    dataIndex: 'title',
    width: 200,
    ellipsis: true,
    tooltip: true,
  },
  {
    title: '工单类型',
    dataIndex: 'type',
    slotName: 'type',
    width: 100,
  },
  {
    title: '工单状态',
    dataIndex: 'status',
    slotName: 'status',
    width: 100,
  },
  {
    title: '优先级',
    dataIndex: 'priority',
    slotName: 'priority',
    width: 100,
  },
  {
    title: 'Incident',
    dataIndex: 'incident_id',
    slotName: 'incident',
    width: 120,
  },
  {
    title: '响应截止',
    dataIndex: 'response_deadline',
    slotName: 'response_deadline',
    width: 180,
  },
  {
    title: '解决截止',
    dataIndex: 'resolve_deadline',
    slotName: 'resolve_deadline',
    width: 180,
  },
  {
    title: 'SLA',
    dataIndex: 'sla_violated',
    slotName: 'sla_status',
    width: 110,
  },
  {
    title: '创建人',
    dataIndex: 'creator_name',
    width: 120,
  },
  {
    title: '处理人',
    dataIndex: 'assignee_name',
    width: 120,
  },
  {
    title: '创建时间',
    dataIndex: 'created_at',
    width: 180,
  },
  {
    title: '操作',
    dataIndex: 'actions',
    slotName: 'actions',
    width: 200,
    fixed: 'right' as const,
  },
]
