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

export const formSchemas: FormSchema[] = [
  {
    label: '名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '地址',
    field: 'address',
    component: 'Input',
  },

  {
    label: '维保单位',
    field: 'maintenance',
    component: 'Input',
  },
];

export const columns: BasicColumn[] = [
  {
    title: '主键id',
    dataIndex: 'id',
    ifShow: false,
  },
  {
    title: '名称',
    dataIndex: 'name',
  },
  {
    title: '地址',
    dataIndex: 'address',
  },
  {
    title: '负责人',
    dataIndex: 'principal',
  },
  {
    title: '负责人手机',
    dataIndex: 'principalPhone',
  },
  {
    title: '应急救援负责人',
    dataIndex: 'emergency',
  },
  {
    title: '应急救援负责人手机',
    dataIndex: 'emergencyPhone',
  },
  {
    title: '维保单位',
    dataIndex: 'maintenance',
  },
];

export const modalSchemas: FormSchema[] = [
  {
    label: '主键id',
    field: 'id',
    required: false,
    component: 'Input',
    show: false,
  },
  {
    label: '名称',
    field: 'name',
    required: true,
    component: 'Input',
  },
  {
    label: '地址',
    field: 'address',
    required: true,
    component: 'Input',
  },
  {
    label: '负责人',
    field: 'principal',
    required: true,
    component: 'Input',
  },
  {
    label: '负责人手机',
    field: 'principalPhone',
    required: true,
    component: 'Input',
  },
  {
    label: '应急救援负责人',
    field: 'emergency',
    required: true,
    component: 'Input',
  },
  {
    label: '应急救援负责人手机',
    field: 'emergencyPhone',
    required: true,
    component: 'Input',
  },
  {
    label: '维保单位',
    field: 'maintenance',
    required: true,
    component: 'Input',
  },
  {
    label: '组织',
    field: 'organization',
    required: true,
    component: 'Input',
  },
  {
    label: '经度',
    field: 'lng',
    required: true,
    component: 'Input',
  },
  {
    label: '纬度',
    field: 'lat',
    required: true,
    component: 'Input',
  },

  {
    label: '单位资质',
    field: 'certification',
    required: true,
    component: 'Input',
  },
];
