chore(messages): update collection translations for multiple languages

This commit is contained in:
Fatih Kadir Akın
2026-01-04 22:05:19 +03:00
parent e3844e7836
commit dcd04429b7
21 changed files with 610 additions and 49 deletions
@@ -0,0 +1,20 @@
-- CreateTable
CREATE TABLE "collections" (
"userId" TEXT NOT NULL,
"promptId" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "collections_pkey" PRIMARY KEY ("userId","promptId")
);
-- CreateIndex
CREATE INDEX "collections_userId_idx" ON "collections"("userId");
-- CreateIndex
CREATE INDEX "collections_promptId_idx" ON "collections"("promptId");
-- AddForeignKey
ALTER TABLE "collections" ADD CONSTRAINT "collections_promptId_fkey" FOREIGN KEY ("promptId") REFERENCES "prompts"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "collections" ADD CONSTRAINT "collections_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
+15
View File
@@ -43,6 +43,7 @@ model User {
commentVotes CommentVote[]
notifications Notification[] @relation("NotificationRecipient")
notificationsActed Notification[] @relation("NotificationActor")
collections Collection[]
@@map("users")
}
@@ -122,6 +123,7 @@ model Prompt {
contributors User[] @relation("PromptContributors")
outgoingConnections PromptConnection[] @relation("ConnectionSource")
incomingConnections PromptConnection[] @relation("ConnectionTarget")
collectedBy Collection[]
@@index([authorId])
@@index([categoryId])
@@ -248,6 +250,19 @@ model PinnedPrompt {
@@map("pinned_prompts")
}
model Collection {
userId String
promptId String
createdAt DateTime @default(now())
prompt Prompt @relation(fields: [promptId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@id([userId, promptId])
@@index([userId])
@@index([promptId])
@@map("collections")
}
model PromptReport {
id String @id @default(cuid())
reason ReportReason