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

export const columns: BasicColumn[] = [
  {
    title: '常量名称',
    dataIndex: 'name',
  },
  {
    title: '常量类型',
    dataIndex: 'type',
  },
  {
    title: '备注',
    dataIndex: 'remark',
  },
  {
    title: '常量编码',
    dataIndex: 'code',
  },
  {
    title: '目录id',
    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: 'remark',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入备注',
    },
  },
  {
    label: '常量编码',
    field: 'code',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入常量编码',
    },
  },
  {
    label: '目录id',
    field: 'cateid',
    required: true,
    component: 'Input',
    componentProps: {
      placeholder: '请输入目录id',
    },
  },
];
// 表单详情查看
export const viewSchema: DescItem[] = [
  {
    label: 'id',
    field: 'id',
  },
  {
    label: '常量名称',
    field: 'name',
  },
  {
    label: '常量类型',
    field: 'type',
  },
  {
    label: '备注',
    field: 'remark',
  },
  {
    label: '常量编码',
    field: 'code',
  },
  {
    label: '目录id',
    field: 'cateid',
  },
  {
    label: '记录创建时间',
    field: 'createTime',
  },
  {
    label: '记录更新时间',
    field: 'updateTime',
  },
];
