Skip to content

Commit 84688d0

Browse files
Added reddit messages schema.
1 parent 45c8041 commit 84688d0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

prisma/schema.prisma

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,27 @@ model Location {
8484
8585
@@map("locations")
8686
}
87+
88+
model RedditMessage {
89+
id Int @id @default(autoincrement())
90+
redditId String @unique
91+
type String // "comment", "post", "dm"
92+
author String
93+
content String
94+
bodyHtml String?
95+
subreddit String?
96+
contextUrl String?
97+
isRead Boolean @default(false)
98+
createdAt DateTime
99+
receivedAt DateTime @default(now())
100+
parentId String? // For thread tracking
101+
rawData Json? // Store original API response
102+
messageType String? // "inbox", "sent", "modmail"
103+
isSubredditModMail Boolean @default(false)
104+
isInternal Boolean @default(false) // For mod discussions
105+
106+
@@index([author])
107+
@@index([createdAt])
108+
@@index([isRead])
109+
@@map("reddit_messages")
110+
}

0 commit comments

Comments
 (0)