feat: impl file delete

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-09-14 10:59:49 +00:00
parent eb9010cb20
commit eaa2a5cdb8
12 changed files with 259 additions and 69 deletions

13
convex/model/files.ts Normal file
View File

@@ -0,0 +1,13 @@
import { v } from "convex/values"
import { mutation } from "../_generated/server"
export const moveToTrash = mutation({
args: {
fileId: v.id("files"),
},
handler: async (ctx, { fileId }) => {
await ctx.db.patch(fileId, {
deletedAt: new Date().toISOString(),
})
},
})