import { UserDataType } from "@/model/userModel";
import { ColumnsType } from "antd/lib/table";
export const studyColumns: ColumnsType<UserDataType> = [
  {
    title: "标题",
    dataIndex: "title",
  },
  {
    title: "副标题",
    dataIndex: "sub_title",
  },
  {
    title: "内容",
    dataIndex: "content",
    width: 300,
    ellipsis: true,
  },
  {
    title: "积分",
    dataIndex: "score",
  },
];

export const defaultConfig = [
  {
    type: "input",
    label: "标题",
    name: "title",
    value: "",
    rules: [{ required: true, message: "请输入标题!" }],
  },
  {
    type: "input",
    label: "副标题",
    name: "sub_title",
    value: "",
  },
  {
    type: "input",
    label: "积分",
    name: "score",
    value: "",
    rules: [{ required: true, message: "请输入学习积分" }],
  },
  {
    type: "upload",
    label: "附件图片",
    name: "file_url",
    value: [],
  },
  {
    type: "editor",
    label: "内容",
    name: "content",
    value: "",
    rules: [{ required: true, message: "请填写内容" }],
  },
];
