@optimatech88/titomeet-shared-lib 1.0.46 → 1.0.48
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/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "public"."Feedback" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"category" TEXT NOT NULL,
|
|
5
|
+
"rating" INTEGER NOT NULL,
|
|
6
|
+
"comment" TEXT NOT NULL,
|
|
7
|
+
"email" TEXT,
|
|
8
|
+
"userId" TEXT,
|
|
9
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
10
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
11
|
+
|
|
12
|
+
CONSTRAINT "Feedback_pkey" PRIMARY KEY ("id")
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
-- AddForeignKey
|
|
16
|
+
ALTER TABLE "public"."Feedback" ADD CONSTRAINT "Feedback_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -33,6 +33,7 @@ model User {
|
|
|
33
33
|
|
|
34
34
|
userInterests UserInterests?
|
|
35
35
|
transactions Transaction[]
|
|
36
|
+
feedbacks Feedback[]
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
model Account {
|
|
@@ -424,3 +425,16 @@ model Transaction {
|
|
|
424
425
|
createdAt DateTime @default(now())
|
|
425
426
|
updatedAt DateTime @updatedAt
|
|
426
427
|
}
|
|
428
|
+
|
|
429
|
+
model Feedback {
|
|
430
|
+
id String @id @default(cuid())
|
|
431
|
+
category String
|
|
432
|
+
rating Int
|
|
433
|
+
comment String
|
|
434
|
+
email String?
|
|
435
|
+
userId String?
|
|
436
|
+
user User? @relation(fields: [userId], references: [id])
|
|
437
|
+
|
|
438
|
+
createdAt DateTime @default(now())
|
|
439
|
+
updatedAt DateTime @updatedAt
|
|
440
|
+
}
|