-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathschema.prisma
More file actions
38 lines (30 loc) · 994 Bytes
/
schema.prisma
File metadata and controls
38 lines (30 loc) · 994 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
36
37
38
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
previewFeatures = ["typedSql"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DATABASE_URL_UNPOOLED")
}
generator enum {
provider = "node node_modules/prisma-generator-ts-enums" // specify the path to this generator here
output = "../src/types/enums.ts" // optionally, you can specify an output filename here -- default is ./types/enums.d.ts
}
model User {
id String @id @default(cuid())
email String @unique
name String?
avatarUrl String?
role UserRole @default(USER)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
enum UserRole {
ADMIN
USER
}