feat: 优化接口速度

This commit is contained in:
2026-04-24 22:02:53 +08:00
parent fd20a4411b
commit d1c5b818d9
5 changed files with 148 additions and 60 deletions
@@ -0,0 +1,5 @@
-- CreateIndex
CREATE INDEX "windows_recordId_idx" ON "windows"("recordId");
-- CreateIndex
CREATE INDEX "screenshots_recordId_idx" ON "screenshots"("recordId");
+4 -1
View File
@@ -55,6 +55,8 @@ model Window {
// Relations
record Record @relation(fields: [recordId], references: [id], onDelete: Cascade)
@@index([recordId])
@@map("windows")
}
@@ -71,7 +73,8 @@ model Screenshot {
// Relations
record Record @relation(fields: [recordId], references: [id], onDelete: Cascade)
@@index([recordId])
@@index([objectName])
@@map("screenshots")
}