import { optionsFilter } from '@/quickComponents/utils'
import { parseTime } from '@/utils'

export const typeOptions = [
  {
    label: '商务合作',
    value: '0'
  },
  {
    label: '媒体采访',
    value: '1'
  },
  {
    label: '意见与投诉',
    value: '2'
  },
]
const statusOptions = [
  {
    label: '未处理',
    value: '0'
  },
  {
    label: '已处理',
    value: '1'
  },
]

export const filterFields = [
  {
    type: 'select',
    prop: 'status',
    props: {
      placehold: '请选择状态',
      options: statusOptions
    }
  }
]

export const tableFields = {
  name: '用户名称',
  contactInformation: '联系方式',
  content: '内容',
  status: {
    label: '状态',
    filter: (status) => optionsFilter(status, statusOptions)
  },
  createDate: {
    label: '创建时间',
    filter: (time) => parseTime(time)
  }
}
