import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import { ColumnsType } from "antd/lib/table";
export const columns: ColumnsType<UserDataType> = [
  {
    title: "分类名称",
    dataIndex: "name",
  },
  {
    title: "分类",
    dataIndex: "drop_type",
    render: (drop_type) => <>{[
      { id: 1, name: "婚姻" },
      { id: 2, name: "政治面貌" },
      { id: 3, name: "文化程度" },
      { id: 4, name: "民族" },
      { id: 5, name: "单位性质" },
      { id: 6, name: "服役军兵种" },
      { id: 7, name: "军衔" },
      { id: 8, name: "技术职称" },
      { id: 9, name: "职务级别" },
    ].find((v) => v.id === drop_type)?.name || ""}</>,
  },
];

export const defaultCatConfig = [
  {
    type: FormType.input,
    label: "字典名称",
    name: "name",
    value: "",
    rules: [{ required: true, message: "请输入字典名称!" }],
  },
];
