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

export const formSchemas: FormSchema[] = [
  {
    label: '区域编码',
    field: 'code',
    component: 'Input',
  },
  {
    label: '区域名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '父级id',
    field: 'parentId',
    component: 'Input',
  },
  {
    label: '父级名称',
    field: 'parentName',
    component: 'Input',
  },
];

export const columns: BasicColumn[] = [
  {
    title: '主键id',
    dataIndex: 'id',
  },
  {
    title: '区域编码',
    dataIndex: 'code',
  },
  {
    title: '区域名称',
    dataIndex: 'name',
  },
  {
    title: '父级id',
    dataIndex: 'parentId',
  },
  {
    title: '父级名称',
    dataIndex: 'parentName',
  },
];

export const modalSchemas: FormSchema[] = [
  {
    label: '主键id',
    field: 'id',
    required: false,
    component: 'Input',
      show: false,
  },
  {
    label: '区域编码',
    field: 'code',
    required: true,
    component: 'Input',
  },
  {
    label: '区域名称',
    field: 'name',
    required: true,
    component: 'Input',
  },
  {
    label: '父级id',
    field: 'parentId',
    required: true,
    component: 'Input',
  },
  {
    label: '父级名称',
    field: 'parentName',
    required: true,
    component: 'Input',
  },
];
