import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '学校ID',
    align: 'center',
    dataIndex: 'schoolId',
  },
  {
    title: '简介',
    align: 'center',
    dataIndex: 'introduction',
  },
  {
    title: '地址',
    align: 'center',
    dataIndex: 'address',
  },
  {
    title: '联系电话',
    align: 'center',
    dataIndex: 'contact',
  },
  {
    title: '官网',
    align: 'center',
    dataIndex: 'website',
  },
  {
    title: '更新时间',
    align: 'center',
    dataIndex: 'updateTime',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    label: '学校ID',
    field: 'schoolId',
    component: 'InputNumber',
    colProps: { span: 6 },
  },
];

export const formSchema: FormSchema[] = [
  {
    label: '学校ID',
    field: 'schoolId',
    component: 'InputNumber',
    required: true,
  },
  {
    label: '简介',
    field: 'introduction',
    component: 'InputTextArea',
    componentProps: {
      rows: 6,
    },
  },
  {
    label: '地址',
    field: 'address',
    component: 'Input',
  },
  {
    label: '联系电话',
    field: 'contact',
    component: 'Input',
  },
  {
    label: '官网',
    field: 'website',
    component: 'Input',
  },
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

export function getBpmFormSchema(_formData): FormSchema[] {
  return formSchema;
}

