import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';

/**
 * 查询表单schema
 */
export const queryFormSchema: FormSchemaGetter = () => [
  {
    component: 'Input',
    fieldName: 'paperName',
    label: '试卷名称',
    componentProps: {
      placeholder: '请输入试卷名称',
    },
  },
];

/**
 * 表格列配置
 */
export const tableColumns: VxeGridProps['columns'] = [
  { type: 'checkbox', width: 80 },
  { field: 'paperName', title: '试卷名称', minWidth: 200 },
  { field: 'categoryName', title: '类别', minWidth: 120 },
  { field: 'createBy', title: '创建人', minWidth: 120 },
  { field: 'totalScore', title: '试卷总分', minWidth: 100 },
  { field: 'questionCount', title: '试题总数', minWidth: 100 },
  { field: 'updateTime', title: '更新日期', minWidth: 120 },
  {
    field: 'action',
    fixed: 'right',
    slots: { default: 'action' },
    title: '操作',
    width: 240,
  },
];
