@adaptware/eagles-db 0.5.55 → 0.5.56
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/client/edge.js +25 -66
- package/client/index-browser.js +20 -61
- package/client/index.d.ts +2581 -4553
- package/client/index.js +25 -66
- package/client/libquery_engine-darwin.dylib.node +0 -0
- package/client/package.json +1 -1
- package/client/schema.prisma +78 -162
- package/client/wasm.js +25 -66
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/migrations/20260519120000_migrate_shortlisted_to_selected/migration.sql +2 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/fitCheck.prisma +2 -0
- package/prisma/schema/interview.prisma +5 -5
- package/prisma/schema/migrations/20260914120000_add_fitcheck_score_reasoning/migration.sql +2 -0
- package/prisma/schema/migrations/20260915120000_drop_interview_legacy_feedback_columns/migration.sql +6 -0
- package/prisma/schema/migrations/20260915150000_add_interview_ai_context_and_oe_relevance/migration.sql +7 -0
- package/prisma/schema/ongoingEvaluation.prisma +3 -0
|
Binary file
|
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -414,62 +414,58 @@ enum ApplicationOfferSubstatus {
|
|
|
414
414
|
|
|
415
415
|
model Application {
|
|
416
416
|
/// Primary key
|
|
417
|
-
id
|
|
417
|
+
id String @id @default(uuid())
|
|
418
418
|
/// Foreign keys
|
|
419
|
-
organisation_id
|
|
420
|
-
candidate_id
|
|
421
|
-
resume_id
|
|
422
|
-
job_description_id
|
|
423
|
-
evaluation_plan_id
|
|
424
|
-
recruiter_id
|
|
425
|
-
source_id
|
|
419
|
+
organisation_id String
|
|
420
|
+
candidate_id String
|
|
421
|
+
resume_id String
|
|
422
|
+
job_description_id String
|
|
423
|
+
evaluation_plan_id String?
|
|
424
|
+
recruiter_id String?
|
|
425
|
+
source_id String?
|
|
426
426
|
/// Data fields
|
|
427
|
-
fit_check_score
|
|
428
|
-
applied_at
|
|
429
|
-
round_no
|
|
430
|
-
is_jaf_completed
|
|
431
|
-
proceed_to_next_round
|
|
432
|
-
evaluationComment
|
|
427
|
+
fit_check_score Float?
|
|
428
|
+
applied_at DateTime @default(now())
|
|
429
|
+
round_no Int @default(0)
|
|
430
|
+
is_jaf_completed Boolean @default(false)
|
|
431
|
+
proceed_to_next_round Boolean? @default(false)
|
|
432
|
+
evaluationComment String?
|
|
433
433
|
/// Candidate flag (orthogonal to ApplicationStatus). Latest actor/comment only.
|
|
434
|
-
is_flagged
|
|
435
|
-
flag_comment
|
|
436
|
-
flagged_at
|
|
437
|
-
flagged_by
|
|
438
|
-
unflag_comment
|
|
439
|
-
unflagged_at
|
|
440
|
-
unflagged_by
|
|
441
|
-
fit_check_status
|
|
442
|
-
status
|
|
434
|
+
is_flagged Boolean @default(false)
|
|
435
|
+
flag_comment String?
|
|
436
|
+
flagged_at DateTime?
|
|
437
|
+
flagged_by String?
|
|
438
|
+
unflag_comment String?
|
|
439
|
+
unflagged_at DateTime?
|
|
440
|
+
unflagged_by String?
|
|
441
|
+
fit_check_status FitCheckStatus?
|
|
442
|
+
status ApplicationStatus @default(PENDING)
|
|
443
443
|
/// Fine-grained offer-stage state. Meaningful only when status = OFFER (or was OFFER for a terminal-substatus that flipped to REJECTED / JOINED).
|
|
444
|
-
offer_substatus
|
|
444
|
+
offer_substatus ApplicationOfferSubstatus?
|
|
445
445
|
/// Audit fields
|
|
446
|
-
created_at
|
|
447
|
-
updated_at
|
|
448
|
-
created_by
|
|
449
|
-
updated_by
|
|
450
|
-
is_active
|
|
451
|
-
fit_check_report_document_id String? @unique
|
|
452
|
-
fit_check_report_updated_flag Boolean @default(false)
|
|
453
|
-
fit_check_report_data Json? @default("{}")
|
|
446
|
+
created_at DateTime @default(now())
|
|
447
|
+
updated_at DateTime @updatedAt
|
|
448
|
+
created_by String
|
|
449
|
+
updated_by String
|
|
450
|
+
is_active Boolean @default(true)
|
|
454
451
|
/// Relations
|
|
455
|
-
evaluation_plan
|
|
456
|
-
candidate
|
|
457
|
-
organisation
|
|
458
|
-
resume
|
|
459
|
-
job_description
|
|
460
|
-
fit_check
|
|
461
|
-
recruiter
|
|
462
|
-
source
|
|
463
|
-
interviews
|
|
464
|
-
assignments
|
|
465
|
-
ongoing_evaluations
|
|
466
|
-
activity_logs
|
|
467
|
-
notes
|
|
468
|
-
conversations
|
|
469
|
-
communication_messages
|
|
470
|
-
job_application_responses
|
|
471
|
-
offer
|
|
472
|
-
fit_check_report_document Document? @relation("ApplicationFitCheckReportDocument", fields: [fit_check_report_document_id], references: [id], onDelete: SetNull)
|
|
452
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id])
|
|
453
|
+
candidate User @relation(fields: [candidate_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
454
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
455
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
456
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
457
|
+
fit_check FitCheck?
|
|
458
|
+
recruiter User? @relation("ApplicationRecruiter", fields: [recruiter_id], references: [id])
|
|
459
|
+
source Source? @relation(fields: [source_id], references: [id], onDelete: SetNull)
|
|
460
|
+
interviews Interview[]
|
|
461
|
+
assignments Assignment[]
|
|
462
|
+
ongoing_evaluations OngoingEvaluation[]
|
|
463
|
+
activity_logs ActivityLog[]
|
|
464
|
+
notes Notes[]
|
|
465
|
+
conversations Conversation[]
|
|
466
|
+
communication_messages CommunicationMessage[]
|
|
467
|
+
job_application_responses JobApplicationResponse[]
|
|
468
|
+
offer Offer?
|
|
473
469
|
|
|
474
470
|
@@unique([candidate_id, job_description_id]) // Ensures candidate applies only once per job
|
|
475
471
|
@@index([candidate_id])
|
|
@@ -556,8 +552,6 @@ model AssessmentLibrary {
|
|
|
556
552
|
created_by String
|
|
557
553
|
updated_by String
|
|
558
554
|
is_active Boolean @default(true)
|
|
559
|
-
/// Frozen question plan, batch cursor, and bank-generation status (JSON).
|
|
560
|
-
generation_state Json?
|
|
561
555
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
562
556
|
questions Question[] // One assessment → many questions
|
|
563
557
|
assessments Assessment[]
|
|
@@ -1407,7 +1401,6 @@ model Document {
|
|
|
1407
1401
|
offer_letters OfferLetter[] @relation("OfferLetterPdf")
|
|
1408
1402
|
offer_letter_template_snapshots OfferLetter[] @relation("OfferLetterTemplateSnapshot")
|
|
1409
1403
|
offer_draft_edited_html Offer[] @relation("OfferDraftEditedHtml")
|
|
1410
|
-
application_fit_check_report Application? @relation("ApplicationFitCheckReportDocument")
|
|
1411
1404
|
|
|
1412
1405
|
// Indexes
|
|
1413
1406
|
@@index([candidate_id])
|
|
@@ -1452,8 +1445,6 @@ model EvaluationCriteria {
|
|
|
1452
1445
|
|
|
1453
1446
|
enum RoundType {
|
|
1454
1447
|
ASSESSMENT
|
|
1455
|
-
GENERAL_APTITUDE_ASSESSMENT
|
|
1456
|
-
DOMAIN_KNOWLEDGE_ASSESSMENT
|
|
1457
1448
|
INTERVIEW
|
|
1458
1449
|
ASSIGNMENT
|
|
1459
1450
|
SCREENING
|
|
@@ -1548,6 +1539,26 @@ model EvaluationPlan {
|
|
|
1548
1539
|
@@schema("public")
|
|
1549
1540
|
}
|
|
1550
1541
|
|
|
1542
|
+
model Feedback {
|
|
1543
|
+
id String @id @default(uuid())
|
|
1544
|
+
interview_id String
|
|
1545
|
+
order_no Int
|
|
1546
|
+
|
|
1547
|
+
ai_feedback Json?
|
|
1548
|
+
human_feedback Json?
|
|
1549
|
+
|
|
1550
|
+
created_at DateTime @default(now())
|
|
1551
|
+
updated_at DateTime @updatedAt
|
|
1552
|
+
created_by String
|
|
1553
|
+
updated_by String
|
|
1554
|
+
is_active Boolean @default(true)
|
|
1555
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
1556
|
+
|
|
1557
|
+
@@unique([interview_id, order_no])
|
|
1558
|
+
@@index([interview_id])
|
|
1559
|
+
@@schema("public")
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1551
1562
|
enum FitCheckStatus {
|
|
1552
1563
|
RECOMMENDED
|
|
1553
1564
|
TO_REVIEW
|
|
@@ -1959,19 +1970,14 @@ enum AiAssistanceMode {
|
|
|
1959
1970
|
model Interview {
|
|
1960
1971
|
id String @id @default(uuid())
|
|
1961
1972
|
/// Foreign keys
|
|
1962
|
-
organisation_id String
|
|
1973
|
+
organisation_id String
|
|
1963
1974
|
candidate_id String
|
|
1964
1975
|
interviewer_id String?
|
|
1965
|
-
evaluation_plan_id String
|
|
1976
|
+
evaluation_plan_id String
|
|
1966
1977
|
application_id String?
|
|
1967
1978
|
resume_id String
|
|
1968
|
-
job_description_id String
|
|
1979
|
+
job_description_id String
|
|
1969
1980
|
calendar_event_id String?
|
|
1970
|
-
calendar_events Json?
|
|
1971
|
-
/// True for candidate-initiated profile enrichment voice sessions (not hiring).
|
|
1972
|
-
candidate_initiated Boolean @default(false)
|
|
1973
|
-
/// Profile AI: purpose, focusAreas, focusAreaCoverage, etc.
|
|
1974
|
-
candidate_interview_metadata Json?
|
|
1975
1981
|
/// Data
|
|
1976
1982
|
room_name String?
|
|
1977
1983
|
/// @deprecated Prefer `ai_feedback.feedback` (narrative string on AI feedback JSON).
|
|
@@ -2032,27 +2038,27 @@ model Interview {
|
|
|
2032
2038
|
// Relations
|
|
2033
2039
|
candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
|
|
2034
2040
|
interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
|
|
2035
|
-
organisation Organisation
|
|
2041
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2036
2042
|
recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2037
|
-
job_description JobDescription
|
|
2043
|
+
job_description JobDescription @relation(fields: [job_description_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2038
2044
|
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2039
2045
|
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2040
2046
|
application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2041
2047
|
ongoing_evaluation OngoingEvaluation?
|
|
2042
2048
|
transcripts Transcript[]
|
|
2043
2049
|
suggestions Suggestion[]
|
|
2050
|
+
feedback Feedback[]
|
|
2044
2051
|
interviewNotes InterviewNotes[]
|
|
2045
2052
|
liveAnalysis LiveAnalysis[]
|
|
2046
2053
|
zoom_meeting ZoomMeeting?
|
|
2047
2054
|
|
|
2048
2055
|
// Indexes
|
|
2056
|
+
@@unique([interviewer_id, candidate_id, evaluation_plan_id])
|
|
2049
2057
|
@@index([candidate_id])
|
|
2050
|
-
@@index([candidate_id, candidate_initiated, created_at])
|
|
2051
2058
|
@@index([interviewer_id])
|
|
2052
2059
|
@@index([job_description_id])
|
|
2053
2060
|
@@index([organisation_id, interview_status])
|
|
2054
2061
|
@@index([interview_status, scheduled_start_time])
|
|
2055
|
-
@@index([candidate_initiated, interview_status])
|
|
2056
2062
|
@@schema("public")
|
|
2057
2063
|
}
|
|
2058
2064
|
|
|
@@ -2375,15 +2381,13 @@ model JobApplicationField {
|
|
|
2375
2381
|
updated_by String
|
|
2376
2382
|
created_at DateTime @default(now())
|
|
2377
2383
|
updated_at DateTime @updatedAt
|
|
2378
|
-
/// order of question
|
|
2379
|
-
order_no Int? //nullable for now to allow migration
|
|
2380
2384
|
/// Relations
|
|
2381
2385
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2382
2386
|
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2383
2387
|
job_application_responses JobApplicationResponse[]
|
|
2384
2388
|
|
|
2385
2389
|
/// Indexes
|
|
2386
|
-
@@index([organisation_id, template_id
|
|
2390
|
+
@@index([organisation_id, template_id])
|
|
2387
2391
|
@@schema("public")
|
|
2388
2392
|
}
|
|
2389
2393
|
|
|
@@ -2411,14 +2415,13 @@ model JobApplicationResponse {
|
|
|
2411
2415
|
created_by String
|
|
2412
2416
|
updated_by String
|
|
2413
2417
|
is_active Boolean @default(true)
|
|
2414
|
-
order_no Int? //nullable for now to allow migration
|
|
2415
2418
|
/// Relations
|
|
2416
2419
|
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2417
2420
|
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
2418
2421
|
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2419
2422
|
|
|
2420
|
-
|
|
2421
|
-
@@index([application_id
|
|
2423
|
+
/// Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
|
|
2424
|
+
@@index([application_id])
|
|
2422
2425
|
@@index([job_application_field_id])
|
|
2423
2426
|
@@schema("public")
|
|
2424
2427
|
}
|
|
@@ -2758,15 +2761,13 @@ model AiCostLedgerEntry {
|
|
|
2758
2761
|
@@schema("licensing")
|
|
2759
2762
|
}
|
|
2760
2763
|
|
|
2761
|
-
/// Immutable assignment history for Hiring Unit department/
|
|
2764
|
+
/// Immutable assignment history for Hiring Unit department/job changes.
|
|
2762
2765
|
model PurchasedHiringUnitAssignmentEvent {
|
|
2763
2766
|
id String @id @default(uuid())
|
|
2764
2767
|
purchased_hiring_unit_id String
|
|
2765
2768
|
event_kind PurchasedHiringUnitAssignmentEventKind
|
|
2766
2769
|
previous_department_id String?
|
|
2767
2770
|
new_department_id String?
|
|
2768
|
-
previous_assigned_user_id String?
|
|
2769
|
-
new_assigned_user_id String?
|
|
2770
2771
|
previous_job_description_id String?
|
|
2771
2772
|
new_job_description_id String?
|
|
2772
2773
|
effective_at DateTime @default(now())
|
|
@@ -2879,8 +2880,6 @@ enum PurchasedTopUpStatus {
|
|
|
2879
2880
|
enum PurchasedHiringUnitAssignmentEventKind {
|
|
2880
2881
|
DEPARTMENT_ASSIGNED
|
|
2881
2882
|
DEPARTMENT_UNASSIGNED
|
|
2882
|
-
USER_ASSIGNED
|
|
2883
|
-
USER_UNASSIGNED
|
|
2884
2883
|
JOB_LINKED
|
|
2885
2884
|
JOB_UNLINKED
|
|
2886
2885
|
|
|
@@ -3002,8 +3001,6 @@ model PurchasedHiringUnit {
|
|
|
3002
3001
|
status PurchasedHiringUnitStatus @default(AVAILABLE)
|
|
3003
3002
|
/// Current department allocation (licensing allocation, not hiring manager).
|
|
3004
3003
|
department_id String?
|
|
3005
|
-
/// Optional person reservation. Units with this set are consumed before dept/org pools.
|
|
3006
|
-
assigned_user_id String?
|
|
3007
3004
|
/// Set once when department_id is first assigned; not cleared on reassignment.
|
|
3008
3005
|
first_assigned_at DateTime?
|
|
3009
3006
|
/// Optional unit expiry.
|
|
@@ -3020,7 +3017,6 @@ model PurchasedHiringUnit {
|
|
|
3020
3017
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
3021
3018
|
purchased_license_package PurchasedLicensePackage @relation(fields: [purchased_license_package_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
3022
3019
|
department Department? @relation(fields: [department_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
3023
|
-
assigned_user User? @relation("AssignedHiringUnits", fields: [assigned_user_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
3024
3020
|
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
3025
3021
|
assignment_events PurchasedHiringUnitAssignmentEvent[]
|
|
3026
3022
|
ledger_entries LicensingLedgerEntry[]
|
|
@@ -3029,11 +3025,9 @@ model PurchasedHiringUnit {
|
|
|
3029
3025
|
@@index([organisation_id])
|
|
3030
3026
|
@@index([purchased_license_package_id])
|
|
3031
3027
|
@@index([department_id])
|
|
3032
|
-
@@index([assigned_user_id])
|
|
3033
3028
|
@@index([job_description_id])
|
|
3034
3029
|
@@index([organisation_id, status])
|
|
3035
3030
|
@@index([organisation_id, department_id])
|
|
3036
|
-
@@index([organisation_id, assigned_user_id])
|
|
3037
3031
|
@@index([organisation_id, job_description_id])
|
|
3038
3032
|
@@map("purchased_hiring_units")
|
|
3039
3033
|
@@schema("licensing")
|
|
@@ -3500,15 +3494,6 @@ enum OrganisationSize {
|
|
|
3500
3494
|
@@schema("public")
|
|
3501
3495
|
}
|
|
3502
3496
|
|
|
3503
|
-
/// Who may consume unused hiring units. Changing this does not rewrite unit rows.
|
|
3504
|
-
enum HiringUnitAssignmentScope {
|
|
3505
|
-
USER
|
|
3506
|
-
DEPARTMENT
|
|
3507
|
-
ORGANISATION
|
|
3508
|
-
|
|
3509
|
-
@@schema("public")
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
3497
|
model Organisation {
|
|
3513
3498
|
id String @id @default(uuid())
|
|
3514
3499
|
name String @unique
|
|
@@ -3551,8 +3536,6 @@ model Organisation {
|
|
|
3551
3536
|
timezone String @default("Asia/Kolkata")
|
|
3552
3537
|
/// ISO 3166-1 alpha-2 (e.g. IN).
|
|
3553
3538
|
country_code String @default("IN")
|
|
3554
|
-
/// Who may consume unused hiring units. Does not rewrite unit rows when changed.
|
|
3555
|
-
hiring_unit_assignment_scope HiringUnitAssignmentScope @default(DEPARTMENT)
|
|
3556
3539
|
organisation_configs OrganisationConfig[]
|
|
3557
3540
|
activity_events ActivityEvent[]
|
|
3558
3541
|
usage_ledger_entries UsageLedgerEntry[]
|
|
@@ -3733,24 +3716,12 @@ enum Difficulty {
|
|
|
3733
3716
|
@@schema("public")
|
|
3734
3717
|
}
|
|
3735
3718
|
|
|
3736
|
-
enum QuestionCategory {
|
|
3737
|
-
/// Aptitude, logical reasoning, numerical, verbal — non-domain general tests.
|
|
3738
|
-
GENERAL_APTITUDE
|
|
3739
|
-
/// Role/domain/technical knowledge (skills from JD and competencies).
|
|
3740
|
-
DOMAIN_KNOWLEDGE
|
|
3741
|
-
|
|
3742
|
-
@@schema("public")
|
|
3743
|
-
}
|
|
3744
|
-
|
|
3745
3719
|
model Question {
|
|
3746
3720
|
id String @id @default(uuid())
|
|
3747
3721
|
assessment_library_id String?
|
|
3748
3722
|
evaluation_plan_id String?
|
|
3749
3723
|
candidate_id String?
|
|
3750
3724
|
skill String?
|
|
3751
|
-
category QuestionCategory?
|
|
3752
|
-
/// Stable idempotency key for reusable bank rows: `{generationSeed}:{planSlot}`.
|
|
3753
|
-
bank_item_key String?
|
|
3754
3725
|
question String
|
|
3755
3726
|
answer String
|
|
3756
3727
|
options String[] // For MCQ's
|
|
@@ -3767,7 +3738,6 @@ model Question {
|
|
|
3767
3738
|
evaluationPlan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull)
|
|
3768
3739
|
candidateResponse CandidateQuestionResponse[]
|
|
3769
3740
|
|
|
3770
|
-
@@unique([assessment_library_id, bank_item_key])
|
|
3771
3741
|
@@schema("public")
|
|
3772
3742
|
}
|
|
3773
3743
|
|
|
@@ -3834,25 +3804,6 @@ model ReportingOverviewJobRecruiter {
|
|
|
3834
3804
|
@@schema("analytics")
|
|
3835
3805
|
}
|
|
3836
3806
|
|
|
3837
|
-
/// Lifecycle of an AI-authored resume. Legacy/uploaded rows leave this null.
|
|
3838
|
-
enum ResumeStatus {
|
|
3839
|
-
DRAFT
|
|
3840
|
-
GENERATING
|
|
3841
|
-
COMPLETED
|
|
3842
|
-
|
|
3843
|
-
@@schema("public")
|
|
3844
|
-
}
|
|
3845
|
-
|
|
3846
|
-
/// How a resume came to exist. Legacy rows leave this null (read as UPLOADED).
|
|
3847
|
-
enum ResumeOrigin {
|
|
3848
|
-
UPLOADED
|
|
3849
|
-
PARSED
|
|
3850
|
-
AI_GENERATED
|
|
3851
|
-
TAILORED
|
|
3852
|
-
|
|
3853
|
-
@@schema("public")
|
|
3854
|
-
}
|
|
3855
|
-
|
|
3856
3807
|
model Resume {
|
|
3857
3808
|
id String @id @default(uuid())
|
|
3858
3809
|
user_id String?
|
|
@@ -3889,40 +3840,8 @@ model Resume {
|
|
|
3889
3840
|
candidate_profile CandidateProfile? // one-to-one link
|
|
3890
3841
|
yearsOfExperience Int?
|
|
3891
3842
|
|
|
3892
|
-
/// Lifecycle for AI-authored resumes. Null for legacy/uploaded rows (treated as COMPLETED).
|
|
3893
|
-
status ResumeStatus?
|
|
3894
|
-
/// How this resume came to exist. Null for legacy rows (treated as UPLOADED).
|
|
3895
|
-
origin ResumeOrigin?
|
|
3896
|
-
/// Intake session id echoed to the client so a refresh can resume the conversation.
|
|
3897
|
-
intake_session_id String?
|
|
3898
|
-
/// Durable copy of the chat transcript for the AI intake; Redis is the hot path.
|
|
3899
|
-
conversation_history Json?
|
|
3900
|
-
/// Progress 0-100 reported by the ResumeIntake workflow.
|
|
3901
|
-
intake_progress Int?
|
|
3902
|
-
/// Last Orion execution id for the intake/generate workflow, for tracing.
|
|
3903
|
-
orion_execution_id String?
|
|
3904
|
-
/// Snapshot of the candidate's own words, taken immediately before the
|
|
3905
|
-
/// `GenerateResumeFromIntake` polish overwrites `resume_data`. Makes the
|
|
3906
|
-
/// polish reversible, keeps regeneration idempotent (always polish from raw,
|
|
3907
|
-
/// never from already-polished prose), and is the base for a "what changed"
|
|
3908
|
-
/// diff. Null until the first generate; cleared again on revert.
|
|
3909
|
-
intake_raw_data Json?
|
|
3910
|
-
|
|
3911
|
-
/// Raw job description text the candidate pasted to start a tailoring session.
|
|
3912
|
-
tailoring_jd_text String?
|
|
3913
|
-
/// Cached JobDescriptionParser output; computed once per tailoring session.
|
|
3914
|
-
tailoring_jd_parsed Json?
|
|
3915
|
-
/// Cached ResumeGapAnalysis output; computed once per tailoring session.
|
|
3916
|
-
tailoring_gap_analysis Json?
|
|
3917
|
-
/// Working tailoring state: the draft ResumeFormData, tailoring notes, the
|
|
3918
|
-
/// pending contradiction awaiting resolution, and the question counter.
|
|
3919
|
-
/// Scratch space only — the draft is materialised into `resume_data` when the
|
|
3920
|
-
/// candidate saves it.
|
|
3921
|
-
tailoring_draft Json?
|
|
3922
|
-
|
|
3923
3843
|
@@index([user_id])
|
|
3924
3844
|
@@index([file_hash])
|
|
3925
|
-
@@index([user_id, status])
|
|
3926
3845
|
@@schema("public")
|
|
3927
3846
|
}
|
|
3928
3847
|
|
|
@@ -4417,8 +4336,6 @@ model User {
|
|
|
4417
4336
|
created_by String
|
|
4418
4337
|
updated_by String
|
|
4419
4338
|
is_active Boolean @default(true)
|
|
4420
|
-
/// Set when removed from team (Delete); null for active/inactive-only users.
|
|
4421
|
-
deleted_at DateTime?
|
|
4422
4339
|
is_self_registered Boolean @default(true)
|
|
4423
4340
|
permission_id String? @unique
|
|
4424
4341
|
preferences Json? @default("{}")
|
|
@@ -4489,8 +4406,7 @@ model User {
|
|
|
4489
4406
|
employee_number Int?
|
|
4490
4407
|
employee_code String? @unique
|
|
4491
4408
|
|
|
4492
|
-
department_members
|
|
4493
|
-
assigned_hiring_units PurchasedHiringUnit[] @relation("AssignedHiringUnits")
|
|
4409
|
+
department_members DepartmentMember[] @relation("DepartmentMemberships")
|
|
4494
4410
|
|
|
4495
4411
|
@@index([role_id])
|
|
4496
4412
|
@@index([permission_id])
|