feat: add folder management features including creation, deletion, and organization of documents within folders

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-03-27 01:39:15 -07:00
parent 95bb522220
commit 685ad0c02d
41 changed files with 7475 additions and 4330 deletions

View file

@ -6,6 +6,7 @@ export const documentTable = table("documents")
title: string(),
documentType: string().from("document_type"),
searchSpaceId: number().from("search_space_id"),
folderId: number().optional().from("folder_id"),
createdById: string().optional().from("created_by_id"),
status: json(),
createdAt: number().from("created_at"),

View file

@ -0,0 +1,14 @@
import { number, string, table } from "@rocicorp/zero";
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"),
})
.primaryKey("id");

View file

@ -1,6 +1,7 @@
import { createBuilder, createSchema, relationships } from "@rocicorp/zero";
import { chatCommentTable, chatSessionStateTable, newChatMessageTable } from "./chat";
import { documentTable, searchSourceConnectorTable } from "./documents";
import { folderTable } from "./folders";
import { notificationTable } from "./inbox";
const chatCommentRelationships = relationships(chatCommentTable, ({ one }) => ({
@ -28,6 +29,7 @@ export const schema = createSchema({
tables: [
notificationTable,
documentTable,
folderTable,
searchSourceConnectorTable,
newChatMessageTable,
chatCommentTable,