@factor-wise/prisma-schema 2.0.106 → 2.0.107

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factor-wise/prisma-schema",
3
- "version": "2.0.106",
3
+ "version": "2.0.107",
4
4
  "description": "Shared Prisma schema and generated client for Factor Wise projects",
5
5
  "main": "generated/client/index.js",
6
6
  "types": "generated/client/index.d.ts",
@@ -719,6 +719,8 @@ model customer {
719
719
 
720
720
  customerDevices customer_devices[]
721
721
 
722
+ notifications notification[]
723
+
722
724
  @@index([mobile], map: "idx_customer_mobile")
723
725
  @@index([email], map: "idx_customer_email")
724
726
  @@index([pancard], map: "idx_customer_pancard")
@@ -3735,6 +3737,29 @@ model customer_devices {
3735
3737
  @@index([deviceToken])
3736
3738
  }
3737
3739
 
3740
+ model notification {
3741
+ id Int @id @default(autoincrement())
3742
+ customerID Int
3743
+ type String @db.VarChar(100)
3744
+ title String @db.VarChar(255)
3745
+ body String @db.Text
3746
+ data Json?
3747
+ status NotificationStatus @default(PENDING)
3748
+ failureReason String? @db.VarChar(255)
3749
+ createdAt DateTime @default(now())
3750
+ updatedAt DateTime @updatedAt
3751
+ customer customer @relation(fields: [customerID], references: [customerID], onDelete: Cascade)
3752
+
3753
+ @@index([customerID])
3754
+ @@index([status])
3755
+ @@index([type])
3756
+ }
3757
+
3758
+ enum NotificationStatus {
3759
+ PENDING
3760
+ SENT
3761
+ FAILED
3762
+ }
3738
3763
 
3739
3764
  enum DeviceType {
3740
3765
  web