import { BasicColumn, FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
  { title: '分类编码', align: 'center', dataIndex: 'categoryCode' },
  { title: '分类名称', align: 'center', dataIndex: 'categoryName' },
  { title: '父级ID', align: 'center', dataIndex: 'parentId' },
  { title: '状态', align: 'center', dataIndex: 'enableFlag' },
];
export const searchFormSchema: FormSchema[] = [
  { label: '分类编码', field: 'categoryCode', component: 'Input', colProps: { span: 6 } },
  { label: '分类名称', field: 'categoryName', component: 'Input', colProps: { span: 6 } },
];
export const formSchema: FormSchema[] = [
  { label: '', field: 'id', component: 'Input', show: false },
  { label: '分类编码', field: 'categoryCode', component: 'Input', required: true },
  { label: '分类名称', field: 'categoryName', component: 'Input', required: true },
  { label: '父级ID', field: 'parentId', component: 'Input', defaultValue: '0' },
  { label: '树路径', field: 'treePath', component: 'Input' },
  { label: '排序', field: 'sortNo', component: 'InputNumber', defaultValue: 0 },
  { label: '状态', field: 'enableFlag', component: 'Select', defaultValue: 1, componentProps: { options: [{ label: '启用', value: 1 }, { label: '停用', value: 0 }] } },
  { label: '备注', field: 'remark', component: 'InputTextArea' },
];
