Created
December 20, 2019 11:11
-
-
Save nikolasburk/c1b1c2822968aab69053b1dad6390e65 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
datasource sqlite { | |
url = "file:data.db" | |
provider = "sqlite" | |
} | |
generator photonjs { | |
provider = "photonjs" | |
} | |
model User { | |
id Int @id | |
createdAt DateTime @default(now()) | |
email String @unique | |
name String? | |
role Role @default(USER) | |
posts Post[] | |
} | |
model Post { | |
id Int @id | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
author User | |
title String | |
published Boolean @default(false) | |
} | |
enum Role { | |
USER | |
ADMIN | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment