Created
December 20, 2022 03:52
-
-
Save kingRayhan/0c90a2d38f2c4b75f0cf70948dbf8255 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
model File { | |
id String @id @default(auto()) @map("_id") @db.ObjectId | |
name String | |
key String | |
bucket String | |
events Event[] @relation("EventLogos") | |
eventDocs Event[] @relation("EventDocs") | |
@@map("files") | |
} | |
model Event { | |
id String @id @default(auto()) @map("_id") @db.ObjectId | |
logoId String? @db.ObjectId | |
logo File? @relation("EventLogos", fields: [logoId], references: [id]) | |
docIds String[] @db.ObjectId | |
docs File[] @relation("EventDocs", fields: [docIds], references: [id]) | |
@@map("events") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment