@reitwagen/data-layer 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdc/events.d.ts +52 -0
- package/dist/cdc/events.d.ts.map +1 -0
- package/dist/cdc/handlers/index.d.ts +32 -0
- package/dist/cdc/handlers/index.d.ts.map +1 -0
- package/dist/cdc/index.d.ts +3 -0
- package/dist/cdc/index.d.ts.map +1 -0
- package/dist/cdc/index.js +3 -0
- package/dist/cdc/index.js.map +1 -0
- package/dist/chunk-4OINT53S.js +56 -0
- package/dist/chunk-4OINT53S.js.map +1 -0
- package/dist/chunk-TPOKTXPS.js +69 -0
- package/dist/chunk-TPOKTXPS.js.map +1 -0
- package/dist/client.d.ts +31 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -0
- package/dist/helpers/index.d.ts +93 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +155 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/supabase/index.d.ts +9 -0
- package/dist/supabase/index.d.ts.map +1 -0
- package/dist/supabase/index.js +27 -0
- package/dist/supabase/index.js.map +1 -0
- package/package.json +73 -0
- package/prisma/schema.prisma +10905 -0
- package/prisma/supabase/schema.prisma +151 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client-js"
|
|
3
|
+
output = "./generated"
|
|
4
|
+
binaryTargets = ["native", "linux-musl-arm64-openssl-3.0.x", "linux-arm64-openssl-3.0.x", "rhel-openssl-3.0.x"]
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
datasource db {
|
|
8
|
+
provider = "postgresql"
|
|
9
|
+
url = env("SUPABASE_DB_URL")
|
|
10
|
+
schemas = ["public"]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
enum ChatRoomTopic {
|
|
14
|
+
GENERAL
|
|
15
|
+
PRODUCT
|
|
16
|
+
EQUIPMENT
|
|
17
|
+
POST
|
|
18
|
+
WANTED
|
|
19
|
+
DIRECT_DEAL
|
|
20
|
+
|
|
21
|
+
@@map("chat_room_topic")
|
|
22
|
+
@@schema("public")
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
model ChatRoom {
|
|
26
|
+
id String @id @default(uuid()) @db.Uuid
|
|
27
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
28
|
+
roomId String? @unique @db.VarChar
|
|
29
|
+
title String? @db.VarChar
|
|
30
|
+
topic ChatRoomTopic @default(GENERAL)
|
|
31
|
+
topicId BigInt?
|
|
32
|
+
|
|
33
|
+
chats Chat[]
|
|
34
|
+
userOnChatRoom UserOnChatRoom[]
|
|
35
|
+
|
|
36
|
+
@@schema("public")
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
model User {
|
|
40
|
+
id BigInt @id @default(autoincrement())
|
|
41
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
42
|
+
externalUserId BigInt? @unique
|
|
43
|
+
name String? @db.VarChar
|
|
44
|
+
isAdAgreed Boolean @default(true)
|
|
45
|
+
adAgreedAt DateTime? @db.Timestamptz
|
|
46
|
+
isBenefitAgreed Boolean @default(true)
|
|
47
|
+
benefitAgreedAt DateTime? @db.Timestamptz
|
|
48
|
+
isCommunityAgreed Boolean @default(true)
|
|
49
|
+
communityAgreedAt DateTime? @db.Timestamptz
|
|
50
|
+
|
|
51
|
+
chats Chat[]
|
|
52
|
+
userOnChatRooms UserOnChatRoom[]
|
|
53
|
+
recallNoticeLogs RecallNoticeLog[]
|
|
54
|
+
|
|
55
|
+
@@schema("public")
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
model Chat {
|
|
59
|
+
id String @id @default(uuid()) @db.Uuid
|
|
60
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
61
|
+
chatRoom String? @db.Uuid
|
|
62
|
+
content String?
|
|
63
|
+
user BigInt?
|
|
64
|
+
isAttachment Boolean @default(false)
|
|
65
|
+
|
|
66
|
+
chatRoomRel ChatRoom? @relation(fields: [chatRoom], references: [id])
|
|
67
|
+
userRel User? @relation(fields: [user], references: [id])
|
|
68
|
+
|
|
69
|
+
@@schema("public")
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
model UserOnChatRoom {
|
|
73
|
+
id BigInt @id @default(autoincrement())
|
|
74
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
75
|
+
userId BigInt?
|
|
76
|
+
chatRoom String? @db.Uuid
|
|
77
|
+
lastSeenAt DateTime?
|
|
78
|
+
|
|
79
|
+
userRel User? @relation(fields: [userId], references: [id])
|
|
80
|
+
chatRoomRel ChatRoom? @relation(fields: [chatRoom], references: [id])
|
|
81
|
+
|
|
82
|
+
@@schema("public")
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
model Push {
|
|
86
|
+
id String @id @default(uuid()) @db.Uuid
|
|
87
|
+
userId BigInt?
|
|
88
|
+
pushName String @db.VarChar(255)
|
|
89
|
+
title String @db.VarChar(255)
|
|
90
|
+
description String?
|
|
91
|
+
link String? @db.VarChar(1024)
|
|
92
|
+
iconUrl String? @db.VarChar(1024)
|
|
93
|
+
sendAt DateTime @default(now()) @db.Timestamptz
|
|
94
|
+
readAt DateTime? @db.Timestamptz
|
|
95
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
96
|
+
iosAttachmentsId String? @db.VarChar(255)
|
|
97
|
+
pushType String? @db.VarChar(50)
|
|
98
|
+
pushId String? @db.VarChar(255)
|
|
99
|
+
category String?
|
|
100
|
+
|
|
101
|
+
@@schema("public")
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
model RecallNoticeLog {
|
|
105
|
+
id String @id @default(uuid()) @db.Uuid
|
|
106
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
107
|
+
batchId String @db.Uuid
|
|
108
|
+
userId BigInt?
|
|
109
|
+
userName String @db.VarChar(100)
|
|
110
|
+
contactNumber String @db.VarChar(20)
|
|
111
|
+
vin String @db.VarChar(20)
|
|
112
|
+
source String? @db.VarChar(20)
|
|
113
|
+
subscriptionCheckoutId BigInt?
|
|
114
|
+
message String
|
|
115
|
+
recallContentText String?
|
|
116
|
+
recallContentImageUrl String?
|
|
117
|
+
status String @db.VarChar(10)
|
|
118
|
+
error String?
|
|
119
|
+
|
|
120
|
+
userRel User? @relation(fields: [userId], references: [id])
|
|
121
|
+
|
|
122
|
+
@@schema("public")
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
model AdminVerificationCode {
|
|
126
|
+
id String @id @default(uuid()) @db.Uuid
|
|
127
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
128
|
+
email String @db.VarChar(255)
|
|
129
|
+
code String @db.VarChar(6)
|
|
130
|
+
expiresAt DateTime @db.Timestamptz
|
|
131
|
+
userData Json
|
|
132
|
+
used Boolean @default(false)
|
|
133
|
+
|
|
134
|
+
@@schema("public")
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
model AdminSession {
|
|
138
|
+
id String @id @default(uuid()) @db.Uuid
|
|
139
|
+
createdAt DateTime @default(now()) @db.Timestamptz
|
|
140
|
+
updatedAt DateTime @default(now()) @updatedAt @db.Timestamptz
|
|
141
|
+
sessionToken String @unique @db.VarChar(255)
|
|
142
|
+
adminId Int
|
|
143
|
+
email String @db.VarChar(255)
|
|
144
|
+
adminName String? @db.VarChar(255)
|
|
145
|
+
encryptedStrapiToken String
|
|
146
|
+
encryptedWmsToken String?
|
|
147
|
+
expiresAt DateTime @db.Timestamptz
|
|
148
|
+
lastAccessedAt DateTime? @db.Timestamptz
|
|
149
|
+
|
|
150
|
+
@@schema("public")
|
|
151
|
+
}
|