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

export const columns: BasicColumn[] = [
  {
    title: '套餐编码',
    dataIndex: 'packageCode',
  },
  {
    title: '套餐名称',
    dataIndex: 'packageName',
  },
  {
    title: '套餐类型',
    dataIndex: 'type',
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
  },
];

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