2026-04-08 16:48:40 +05:30
|
|
|
import { json, number, string, table } from "@rocicorp/zero";
|
2026-03-27 01:39:15 -07:00
|
|
|
|
|
|
|
|
export const folderTable = table("folders")
|
|
|
|
|
.columns({
|
|
|
|
|
id: number(),
|
|
|
|
|
name: string(),
|
|
|
|
|
position: string(),
|
|
|
|
|
parentId: number().optional().from("parent_id"),
|
|
|
|
|
searchSpaceId: number().from("search_space_id"),
|
|
|
|
|
createdById: string().optional().from("created_by_id"),
|
|
|
|
|
createdAt: number().from("created_at"),
|
|
|
|
|
updatedAt: number().from("updated_at"),
|
2026-04-08 16:48:40 +05:30
|
|
|
metadata: json<Record<string, unknown>>().optional().from("metadata"),
|
2026-03-27 01:39:15 -07:00
|
|
|
})
|
|
|
|
|
.primaryKey("id");
|