-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.prisma
57 lines (50 loc) · 971 Bytes
/
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
57
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
role Role @default(USER)
createdAt DateTime @default(now())
address String? @unique
alias String @unique
nftId Int?
profileNFT Nft? @relation("profileNFT", fields: [nftId], references: [id])
links Link[]
}
model Nft {
id Int @id @default(autoincrement())
address String
imageUrl String?
type NFTType
user User[] @relation("profileNFT")
}
model Link {
id Int @id @default(autoincrement())
type LinkType
url String
title String
userId Int
user User @relation(fields: [userId], references: [id])
}
enum Role {
USER
ADMIN
}
enum NFTType {
ERC20
ERC721
}
enum LinkType {
TWITTER
INSTAGRAM
FACEBOOK
TIKTOK
SNAPCHAT
YOUTUBE
TWITCH
OTHER
}