Skip to content

Instantly share code, notes, and snippets.

@nikolasburk
Created December 20, 2019 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolasburk/c1b1c2822968aab69053b1dad6390e65 to your computer and use it in GitHub Desktop.
Save nikolasburk/c1b1c2822968aab69053b1dad6390e65 to your computer and use it in GitHub Desktop.
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