forked from ymc9/prisma-new-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.zmodel
More file actions
35 lines (30 loc) · 687 Bytes
/
schema.zmodel
File metadata and controls
35 lines (30 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
generator client {
provider = "prisma-client-js"
output = ".prisma/client"
}
plugin prisma {
provider = "@core/prisma"
output = "schema.prisma"
}
plugin enhancer {
provider = '@core/enhancer'
output = '.zenstack'
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
content String?
published Boolean @default(false)
author User? @relation(fields: [authorId], references: [id])
authorId Int? @default(auth().id)
}