@factor-wise/prisma-schema 2.0.13 → 2.0.15
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 +1 -1
- package/prisma/schema.prisma +66 -1
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1171,6 +1171,7 @@ model leads {
|
|
|
1171
1171
|
sanctionUser lms_users @relation("SanctionAssignedUser", fields: [sanctionalloUID], references: [userID])
|
|
1172
1172
|
balanceHistory balance_history[]
|
|
1173
1173
|
collectionFollowups collectionfollowup[]
|
|
1174
|
+
Payout Payout?
|
|
1174
1175
|
|
|
1175
1176
|
@@index([customerID], map: "leadcustomerID")
|
|
1176
1177
|
}
|
|
@@ -1343,7 +1344,8 @@ model loan {
|
|
|
1343
1344
|
allocated_by String? @db.VarChar(64)
|
|
1344
1345
|
acutalDisbursalAmount Int?
|
|
1345
1346
|
exported Boolean @default(false)
|
|
1346
|
-
disbursement_request
|
|
1347
|
+
disbursement_request disbursement_requests?
|
|
1348
|
+
Payout Payout?
|
|
1347
1349
|
lead leads @relation(fields: [leadID], references: [leadID])
|
|
1348
1350
|
}
|
|
1349
1351
|
|
|
@@ -1533,6 +1535,56 @@ model payout_accounts_log {
|
|
|
1533
1535
|
@@ignore
|
|
1534
1536
|
}
|
|
1535
1537
|
|
|
1538
|
+
model Payout {
|
|
1539
|
+
id Int @id @default(autoincrement())
|
|
1540
|
+
razorpayPayoutId String @unique
|
|
1541
|
+
fundAccountId String
|
|
1542
|
+
amount BigInt
|
|
1543
|
+
status PayoutStatus
|
|
1544
|
+
performed_by Int?
|
|
1545
|
+
payload Json?
|
|
1546
|
+
response Json?
|
|
1547
|
+
narration String?
|
|
1548
|
+
referenceId String?
|
|
1549
|
+
failureReason String?
|
|
1550
|
+
statusReason String?
|
|
1551
|
+
statusDescription String?
|
|
1552
|
+
statusSource String?
|
|
1553
|
+
createdAtRzp BigInt?
|
|
1554
|
+
isTerminal Boolean @default(false)
|
|
1555
|
+
leadId Int @unique()
|
|
1556
|
+
leads leads @relation(fields: [leadId], references: [leadID])
|
|
1557
|
+
loanId Int @unique()
|
|
1558
|
+
loan loan @relation(fields: [loanId], references: [id])
|
|
1559
|
+
createdAt DateTime? @default(now()) @db.Timestamp(0)
|
|
1560
|
+
updatedAt DateTime @updatedAt
|
|
1561
|
+
|
|
1562
|
+
webhookLogs PayoutWebhookLog[]
|
|
1563
|
+
statusHistory PayoutStatusHistory[]
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
model PayoutWebhookLog {
|
|
1567
|
+
id Int @id @default(autoincrement())
|
|
1568
|
+
eventId String?
|
|
1569
|
+
eventType String
|
|
1570
|
+
payload Json
|
|
1571
|
+
payoutId Int?
|
|
1572
|
+
createdAt DateTime @default(now())
|
|
1573
|
+
|
|
1574
|
+
payout Payout? @relation(fields: [payoutId], references: [id])
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
model PayoutStatusHistory {
|
|
1579
|
+
id Int @id @default(autoincrement())
|
|
1580
|
+
payoutId Int
|
|
1581
|
+
oldStatus PayoutStatus?
|
|
1582
|
+
newStatus PayoutStatus
|
|
1583
|
+
createdAt DateTime @default(now())
|
|
1584
|
+
|
|
1585
|
+
payout Payout @relation(fields: [payoutId], references: [id])
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1536
1588
|
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
|
|
1537
1589
|
model penny_drop {
|
|
1538
1590
|
id Int
|
|
@@ -2634,3 +2686,16 @@ enum disbursement_requests_status {
|
|
|
2634
2686
|
FAILED
|
|
2635
2687
|
REVERSED
|
|
2636
2688
|
}
|
|
2689
|
+
|
|
2690
|
+
enum PayoutStatus {
|
|
2691
|
+
APPROVAL_PENDING
|
|
2692
|
+
QUEUED
|
|
2693
|
+
PENDING
|
|
2694
|
+
INITIATED
|
|
2695
|
+
UPDATED
|
|
2696
|
+
PROCESSING
|
|
2697
|
+
PROCESSED
|
|
2698
|
+
FAILED
|
|
2699
|
+
REJECTED
|
|
2700
|
+
REVERSED
|
|
2701
|
+
}
|