@adaptware/eagles-db 0.5.34 → 0.5.35

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-05655c10cdac884310a7de347538d0ba3e76ee9bde2b20a0e8765ca45a53bc28",
2
+ "name": "prisma-client-3b5fc539c53ddf1f73f8cdfec89fe7b5ca1a154532a96168ea4cb84e11b45571",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -1193,6 +1193,8 @@ enum CompetencyCategory {
1193
1193
  TECHNICAL
1194
1194
  BEHAVIOURAL
1195
1195
  AI
1196
+ /// FitCheck analysis only — not a dictionary / job-profile catalog category.
1197
+ EXPERIENCE_RELEVANCE
1196
1198
 
1197
1199
  @@schema("public")
1198
1200
  }
@@ -1567,33 +1569,35 @@ enum FitCheckStatus {
1567
1569
 
1568
1570
  model FitCheck {
1569
1571
  /// Primary key (UUID)
1570
- id String @id @default(uuid())
1572
+ id String @id @default(uuid())
1571
1573
  /// FK to organisations table
1572
- organisation_id String?
1573
- candidate_id String?
1574
- resume_id String
1575
- job_description_id String
1574
+ organisation_id String?
1575
+ candidate_id String?
1576
+ resume_id String
1577
+ job_description_id String
1576
1578
  /// Owning application (inverted from Application.fit_check_id)
1577
- application_id String? @unique
1578
- skills_analysis Json?
1579
- overall_analysis Json?
1580
- overall_score Float
1581
- short_match_analysis Json[]
1582
- fit_comparison Json?
1583
- recommendation Json?
1584
- competencies_analysis Json?
1579
+ application_id String? @unique
1580
+ skills_analysis Json?
1581
+ overall_analysis Json?
1582
+ overall_score Float
1583
+ /// Free-text from Overall Analysis agent; preferred over recommendation Json.
1584
+ overall_recommendation String?
1585
+ short_match_analysis Json[]
1586
+ fit_comparison Json?
1587
+ recommendation Json?
1588
+ competencies_analysis Json?
1585
1589
  /// Audit fields
1586
- created_by String
1587
- updated_by String
1588
- is_active Boolean @default(true)
1589
- created_at DateTime @default(now())
1590
- updated_at DateTime @updatedAt
1590
+ created_by String
1591
+ updated_by String
1592
+ is_active Boolean @default(true)
1593
+ created_at DateTime @default(now())
1594
+ updated_at DateTime @updatedAt
1591
1595
  /// Relations
1592
- organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1593
- candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1594
- resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1595
- job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1596
- application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1596
+ organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1597
+ candidate User? @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1598
+ resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1599
+ job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1600
+ application Application? @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
1597
1601
 
1598
1602
  /// Ensure one FitCheck per (resume_id, job_description_id) pair
1599
1603
  @@unique([resume_id, job_description_id])
@@ -1833,6 +1837,7 @@ enum IntegrationProvider {
1833
1837
  MICROSOFT
1834
1838
  ZOOM
1835
1839
  CALENDLY
1840
+ RAZORPAY
1836
1841
 
1837
1842
  @@schema("public")
1838
1843
  }
@@ -3550,6 +3555,8 @@ model Organisation {
3550
3555
  hiring_plans HiringPlan[]
3551
3556
  employees Employee[]
3552
3557
  competency_dictionaries CompetencyDictionary[]
3558
+ billing_transactions BillingTransaction[]
3559
+ payment_webhook_events PaymentWebhookEvent[]
3553
3560
  purchased_license_packages PurchasedLicensePackage[]
3554
3561
  purchased_hiring_units PurchasedHiringUnit[]
3555
3562
  purchased_top_ups PurchasedTopUp[]
@@ -3575,6 +3582,119 @@ model OrganisationConfig {
3575
3582
  @@schema("public")
3576
3583
  }
3577
3584
 
3585
+ // PAYMENT SERVICE boundary — portable payment microservice owns these enums/columns.
3586
+
3587
+ enum BillingTransactionStatus {
3588
+ INITIATED
3589
+ ORDER_CREATED
3590
+ PAYMENT_PENDING
3591
+ SUCCESS
3592
+ FAILED
3593
+ CANCELLED
3594
+ REFUND_PENDING
3595
+ REFUND_FAILED
3596
+ REFUNDED
3597
+
3598
+ @@schema("public")
3599
+ }
3600
+
3601
+ enum BillingTransactionType {
3602
+ PURCHASE
3603
+ TOP_UP
3604
+ REFUND
3605
+
3606
+ @@schema("public")
3607
+ }
3608
+
3609
+ enum BillingTransactionFailureCategory {
3610
+ RAZORPAY_ORDER
3611
+ RAZORPAY_PAYMENT
3612
+ REFUND
3613
+ INTERNAL
3614
+
3615
+ @@schema("public")
3616
+ }
3617
+
3618
+ /// Payment reconciliation state when Treadspace status is FAILED but Razorpay captured payment.
3619
+ enum BillingPaymentMismatchStatus {
3620
+ DETECTED
3621
+ UNFULFILLED
3622
+
3623
+ @@schema("public")
3624
+ }
3625
+
3626
+ /// Financial transaction lifecycle for organisation billing purchases.
3627
+ model BillingTransaction {
3628
+ id String @id @default(uuid())
3629
+ organisation_id String
3630
+ /// Opaque plan/product identity supplied at checkout. Not a catalog FK.
3631
+ purchase_reference String
3632
+ /// Human-readable snapshot captured at checkout for invoices and receipts.
3633
+ purchase_display_name String?
3634
+ transaction_type BillingTransactionType
3635
+ status BillingTransactionStatus @default(INITIATED)
3636
+ failure_category BillingTransactionFailureCategory?
3637
+ /// Human-readable or provider detail (e.g. Razorpay error_description).
3638
+ failure_reason String?
3639
+ amount Int
3640
+ currency String @default("INR")
3641
+ razorpay_order_id String?
3642
+ razorpay_payment_id String? @unique
3643
+ /// Razorpay payment method at capture (card, netbanking, upi, wallet, etc.).
3644
+ payment_method String?
3645
+ razorpay_subscription_id String?
3646
+ razorpay_refund_id String?
3647
+ refund_reason String?
3648
+ refund_amount Int?
3649
+ idempotency_key String @unique
3650
+ invoice_number String? @unique
3651
+ /// Email of the org Admin who initiated checkout (bill-to).
3652
+ purchaser_email String?
3653
+ /// Set when FAILED but Razorpay order/payment is captured (reconciliation path).
3654
+ payment_mismatch_status BillingPaymentMismatchStatus?
3655
+ /// Strict same-intent SUCCESS transaction that fulfilled the purchase (UNFULFILLED only).
3656
+ payment_mismatch_fulfilled_by_id String?
3657
+ created_at DateTime @default(now())
3658
+ updated_at DateTime @updatedAt
3659
+
3660
+ organisation Organisation @relation(fields: [organisation_id], references: [id])
3661
+
3662
+ @@index([organisation_id, status])
3663
+ @@index([purchase_reference])
3664
+ @@index([razorpay_order_id])
3665
+ @@map("billing_transactions")
3666
+ @@schema("public")
3667
+ }
3668
+
3669
+ enum PaymentWebhookEventStatus {
3670
+ RECEIVED
3671
+ PROCESSED
3672
+ FAILED
3673
+
3674
+ @@schema("public")
3675
+ }
3676
+
3677
+ /// Idempotent record of payment provider webhook deliveries.
3678
+ model PaymentWebhookEvent {
3679
+ id String @id @default(uuid())
3680
+ organisation_id String?
3681
+ provider String
3682
+ provider_event_id String
3683
+ event_type String
3684
+ status PaymentWebhookEventStatus @default(RECEIVED)
3685
+ billing_transaction_id String?
3686
+ error_message String?
3687
+ processed_at DateTime?
3688
+ created_at DateTime @default(now())
3689
+
3690
+ organisation Organisation? @relation(fields: [organisation_id], references: [id])
3691
+
3692
+ @@unique([provider, provider_event_id])
3693
+ @@index([status, created_at])
3694
+ @@map("payment_webhook_events")
3695
+ @@schema("public")
3696
+ }
3697
+
3578
3698
  model Permission {
3579
3699
  id String @id @default(uuid())
3580
3700
  permissions String[] @default([])
@@ -4379,6 +4499,8 @@ model User {
4379
4499
 
4380
4500
  name String?
4381
4501
  phone String?
4502
+ /// Contact email for interviews, assessments, and resume export. Login stays on `email`.
4503
+ communication_email String?
4382
4504
  description String?
4383
4505
  date_of_birth DateTime?
4384
4506
  designation String?