-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.prisma
56 lines (52 loc) · 1.37 KB
/
schema.prisma
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
names String
phone String
email String @unique
gender String
nid String
marital_status String
nationality String
img String?
password String
code String?
Token Token[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model test {
id Int @id @default(autoincrement())
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model ResetPasswordTokens {
id Int @id @default(autoincrement())
token String
tokenUserEmail String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Token {
id Int @id @default(autoincrement())
token String
type TokenType
expires DateTime
blacklisted Boolean
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
userId Int
}
enum TokenType {
ACCESS
RESET_PASSWORD
}