import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '用户Id
',
    align:"center",
    dataIndex: 'userId'
   },
   {
    title: '收件人',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '电话',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '所在地区',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '详细地址',
    align:"center",
    dataIndex: 'addressDetail'
   },
   {
    title: '是否默认 0否 1是',
    align:"center",
    dataIndex: 'defaultFlag'
   },
   {
    title: '是否删除 0否 1是',
    align:"center",
    dataIndex: 'delFlag'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户Id
',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '收件人',
    field: 'name',
    component: 'Input',
  },
  {
    label: '电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '所在地区',
    field: 'address',
    component: 'Input',
  },
  {
    label: '详细地址',
    field: 'addressDetail',
    component: 'Input',
  },
  {
    label: '是否默认 0否 1是',
    field: 'defaultFlag',
    component: 'InputNumber',
  },
  {
    label: '是否删除 0否 1是',
    field: 'delFlag',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入是否删除 0否 1是!'},
          ];
     },
  },
];
