import { FormType } from "@/components/form/interface";
import { UserDataType } from "@/model/userModel";
import { ColumnsType } from "antd/lib/table";
import dayjs from "dayjs";
export const studyColumns: ColumnsType<UserDataType> = [
  {
    title: "姓名",
    dataIndex: "user_name",
  },
  {
    title: "身份证",
    dataIndex: "id_card",
  },
  {
    title: "联系电话",
    dataIndex: "tel",
  },
  {
    title: "签到时间",
    dataIndex: "created_at",
    render(leave_start_time) {
      return dayjs(leave_start_time).format("YYYY-MM-DD HH:mm");
    },
  },
  {
    title: "签到地址",
    dataIndex: "address",
  },
  // {
  //   title: "经度",
  //   dataIndex: "long",
  // },
  // {
  //   title: "纬度",
  //   dataIndex: "lat",
  // },
];

export const serchConfig = [
  {
    type: FormType.input,
    label: "用户名",
    name: "user_name",
    value: "",
    rules: [],
  },
  {
    type: FormType.input,
    label: "身份证号",
    name: "id_card",
    value: "",
    rules: [],
  },
  {
    type: FormType.date,
    label: "开始时间",
    name: "start_time",
    value: "",
    rules: [],
  },
  {
    type: FormType.date,
    label: "结束时间",
    name: "end_time",
    value: "",
    rules: [],
  },
];