import type { AuditLogEntry } from "@components/types/auditlog";
import type { ColumnDef } from "@tanstack/table-core";

export const columns: ColumnDef<AuditLogEntry>[] = [
    {
        accessorKey: "id",
        header: "ID",
    },
    {
        accessorKey: "time",
        header: "Time",
        cell: (info) => new Date(info.getValue<number>()).toLocaleString(),
    },
    {
        accessorKey: "server",
        header: "Server",
    },
    {
        accessorKey: "serverOwner",
        header: "Server Owner",
        cell: (info) => info.getValue<string | null>() || "N/A",
    },
    {
        accessorKey: "actor",
        header: "Spieler",
    },
    {
        accessorKey: "actionType",
        header: "Action Type",
    },
    {
        accessorKey: "actionText",
        header: "Action Text",
    },
];
