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

export const columns: BasicColumn[] = [
  {
    title: '常量名称',
    dataIndex: 'name',
  },
  {
    title: '常量类型',
    dataIndex: 'type',
  },
  {
    title: '常量编码',
    dataIndex: 'code',
  },
  {
    title: '目录',
    dataIndex: 'cateid',
  },
];

// 表单列定义
export const searchFormSchema: FormSchema[] = [
  {
    label: '常量名称',
    field: 'name',
    component: 'Input',
    componentProps: {
      placeholder: '请输入常量名称',
    },
  },
  {
    label: '常量编码',
    field: 'code',
    component: 'Input',
    componentProps: {
      placeholder: '请输入常量编码',
    },
  },
];
// 表单新增编辑
export const dataFormSchema: FormSchema[] = [
  {
    label: '常量名称',
    field: 'name',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入常量名称',
    },
  },
  {
    label: '常量类型',
    field: 'type',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入常量类型',
    },
  },
  {
    label: '常量编码',
    field: 'code',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入常量编码',
    },
  },
  {
    label: '目录',
    field: 'cateid',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入目录id',
    },
  },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
    componentProps: {
      placeholder: '请输入备注',
    },
  },
];
// 表单详情查看
export const viewSchema: DescItem[] = [
  {
    label: '常量名称',
    field: 'name',
  },
  {
    label: '常量类型',
    field: 'type',
  },
  {
    label: '备注',
    field: 'remark',
  },
  {
    label: '常量编码',
    field: 'code',
  },
  {
    label: '目录id',
    field: 'cateid',
  },
];
