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

export const columns: BasicColumn[] = [
  {
    title: '角色名称',
    dataIndex: 'name',
  },
  {
    title: '角色类型',
    dataIndex: 'distributorId',
  },
  // {
  //   title: '创建时间',
  //   dataIndex: 'createTime',
  // },
  {
    title: '备注',
    dataIndex: 'remark',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '角色名称',
    component: 'Input',
    colProps: { span: 8 },
  },
];

export const formSchema = [
  {
    field: 'name',
    label: '角色名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'distributorId',
    label: '角色类型',
    required: true,
    componentProps: {
      placeholder: '角色类型',
      options: [
        {
          label: '华润角色',
          value: 0,
        },
        {
          label: '经销商角色',
          value: -1,
        },
      ],
    },
    component: 'Select',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
  },
];
