-
-
Save marr/0b2e6a58858388df6b448f5d1d2dd879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generator client { | |
provider = "prisma-client-js" | |
} | |
datasource db { | |
provider = "mongodb" | |
url = env("DATABASE_URL") | |
} | |
model TwitterUser { | |
id String @id @map("_id") | |
name String | |
profileImageUrl String | |
publicMetrics Json | |
tweets Tweet[] | |
url String | |
username String | |
verified Boolean | |
} | |
model Tweet { | |
id String @id @map("_id") | |
author TwitterUser @relation(fields: [authorId], references: [id]) | |
authorId String | |
createdAt DateTime | |
entities Json | |
media Media[] @relation(fields: [mediaKeys], references: [mediaKey]) | |
mediaKeys String[] | |
publicMetrics Json | |
text String | |
type String? | |
// referenced_tweets | |
} | |
model Media { | |
mediaKey String @id @map("_id") | |
tweetIds String[] | |
tweets Tweet[] @relation(fields: [tweetIds], references: [id]) | |
type String | |
url String | |
width Int | |
height Int | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment