47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import type { ColumnDef } from "@tanstack/react-table";
|
|
import type { ConnectionLog } from "@/entities/connection-log";
|
|
import dayjs from "dayjs";
|
|
|
|
export const columns: ColumnDef<ConnectionLog>[] = [
|
|
{
|
|
header: "No",
|
|
cell: ({ row, table }) => {
|
|
const totalRows = table.getRowCount();
|
|
const currentPage = table.getState().pagination.pageIndex;
|
|
const pageSize = table.getState().pagination.pageSize;
|
|
return totalRows - (currentPage * pageSize + row.index);
|
|
},
|
|
},
|
|
{
|
|
accessorKey: "cntnDt",
|
|
header: "접속일시",
|
|
cell: ({ row }) => {
|
|
return dayjs(row.original.cntnDt).format("YYYY-MM-DD HH:mm:ss");
|
|
},
|
|
},
|
|
{
|
|
accessorKey: "cntnIp",
|
|
header: "접속IP",
|
|
},
|
|
{
|
|
accessorKey: "cntnRgn",
|
|
header: "접속지역",
|
|
},
|
|
{
|
|
accessorKey: "urlPath",
|
|
header: "URL경로",
|
|
},
|
|
{
|
|
accessorKey: "wbsrKndNm",
|
|
header: "브라우저",
|
|
},
|
|
{
|
|
accessorKey: "siteNm",
|
|
header: "사이트",
|
|
},
|
|
{
|
|
accessorKey: "menuNm",
|
|
header: "메뉴명",
|
|
},
|
|
];
|