Last active
April 7, 2021 15:00
-
-
Save bloo/f6d448c13bf9cd5af2ff6f98026dca8f to your computer and use it in GitHub Desktop.
Resilient Tech Blog - Code-first GraphQL with Nexus - prisma.schema
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
// prisma.schema | |
generator prisma_client { | |
provider = "prisma-client-js" | |
binaryTargets = ["native"] | |
} | |
datasource db { | |
provider = "postgresql" | |
url = env("DATABASE_URL") | |
} | |
model Nonprofit { | |
id String @id @default(@uuid()) | |
name String? | |
Budget Budget[] | |
type NonprofitType | |
} | |
model Budget { | |
id String @id @default(@uuid()) | |
nonprofitId String | |
fiscalYearStart DateTime | |
fiscalYearEnd DateTime | |
amount Int | |
name String | |
Nonprofit Nonprofit @relation(fields: [nonprofitId], references: [id]) | |
} | |
enum NonprofitType { | |
501c3 | |
501k | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment