Files
admin/src/app/(root)/billing/page.tsx

29 lines
940 B
TypeScript
Raw Normal View History

"use client"
import { Suspense } from "react"
import { getPageBill } from "@/actions/bill"
import { DataTable, useDataTable } from "@/components/data-table"
import type { User } from "@/models/user"
export default function UserPage() {
const table = useDataTable<User>((page, size) => getPageBill({ page, size }))
console.log(table, "table")
return (
<Suspense>
<DataTable<User>
{...table}
columns={[
{ header: "ID", accessorKey: "id" },
{ header: "账单号", accessorKey: "bill_no" },
{ header: "信息", accessorKey: "info" },
{ header: "金额", accessorKey: "amount" },
{ header: "可用资源", accessorKey: "resource_id" },
{ header: "类型", accessorKey: "type" },
{ header: "创建时间", accessorKey: "created_at" },
{ header: "更新时间", accessorKey: "updated_at" },
]}
/>
</Suspense>
)
}