initial commit

This commit is contained in:
2025-09-13 22:02:27 +01:00
commit 58e88edfbd
52 changed files with 4102 additions and 0 deletions

28
convex/schema.ts Normal file
View File

@@ -0,0 +1,28 @@
import { defineSchema, defineTable } from "convex/server"
import { v } from "convex/values"
const schema = defineSchema({
users: defineTable({
name: v.string(),
email: v.string(),
createdAt: v.string(),
updatedAt: v.string(),
}),
files: defineTable({
storageId: v.id("_storage"),
userId: v.id("users"),
directoryId: v.optional(v.id("directories")),
name: v.string(),
size: v.number(),
createdAt: v.string(),
updatedAt: v.string(),
}).index("byDirectoryId", ["directoryId"]),
directories: defineTable({
name: v.string(),
parentId: v.optional(v.id("directories")),
createdAt: v.string(),
updatedAt: v.string(),
}).index("byParentId", ["parentId"]),
})
export default schema