import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '年级',
    dataIndex: 'entrydate',
    key: 'entrydate',
    align: 'center',
  },
  {
    title: '学生人数',
    dataIndex: 'studentNumber',
    key: 'studentNumber',
    align: 'center',
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: 'name',
    field: 'name',
    component: 'Input',
  },
  {
    label: 'college',
    field: 'college',
    component: 'Input',
  },
  {
    label: 'majorId',
    field: 'majorId',
    component: 'Input',
  },
  {
    label: 'majorname',
    field: 'majorname',
    component: 'Input',
  },
  {
    label: 'className',
    field: 'className',
    component: 'Input',
  },
  {
    label: 'educate',
    field: 'educate',
    component: 'Input',
  },
  {
    label: 'entrydate',
    field: 'entrydate',
    component: 'Input',
  },
  {
    label: 'campus',
    field: 'campus',
    component: 'Input',
  },
  {
    label: 'state',
    field: 'state',
    component: 'Input',
  },
  {
    label: 'level',
    field: 'level',
    component: 'Input',
  },
  {
    label: 'category',
    field: 'category',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: { title: 'name', order: 0, view: 'text', type: 'string' },
  college: { title: 'college', order: 1, view: 'text', type: 'string' },
  majorId: { title: 'majorId', order: 2, view: 'text', type: 'string' },
  majorname: { title: 'majorname', order: 3, view: 'text', type: 'string' },
  className: { title: 'className', order: 4, view: 'text', type: 'string' },
  educate: { title: 'educate', order: 5, view: 'text', type: 'string' },
  entrydate: { title: 'entrydate', order: 6, view: 'text', type: 'string' },
  campus: { title: 'campus', order: 7, view: 'text', type: 'string' },
  state: { title: 'state', order: 8, view: 'text', type: 'string' },
  level: { title: 'level', order: 9, view: 'text', type: 'string' },
  category: { title: 'category', order: 10, view: 'text', type: 'string' },
};
