Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | uuid | 2147483647 | gen_random_uuid() |
|
|
|||||||||
| companyId | uuid | 2147483647 | √ | null |
|
|
||||||||
| requesterId | uuid | 2147483647 | √ | null |
|
|
||||||||
| status | enum_CompanyVerificationRequests_status | 2147483647 | null |
|
|
|||||||||
| companyVerificationMethodId | uuid | 2147483647 | null |
|
|
|||||||||
| rejectionReasons | _enum_CompanyVerificationRequests_rejectionReason | 2147483647 | √ | null |
|
|
||||||||
| rejectionReasonText | text | 2147483647 | √ | null |
|
|
||||||||
| approvedAt | timestamptz | 35,6 | √ | null |
|
|
||||||||
| internalNotes | text | 2147483647 | √ | null |
|
|
||||||||
| createdAt | timestamptz | 35,6 | now() |
|
|
|||||||||
| updatedAt | timestamptz | 35,6 | now() |
|
|
|||||||||
| internalSalesRemarks | text | 2147483647 | √ | null |
|
|
||||||||
| employerServiceRepId | uuid | 2147483647 | √ | null |
|
|
||||||||
| fraudCheckResult | jsonb | 2147483647 | √ | null |
|
|
||||||||
| metadata | jsonb | 2147483647 | √ | null |
|
|
Additional metadata info about the company verification request |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| CompanyVerificationRequests_pkey | Primary key | Asc | id |
| CompanyVerificationRequests_approved_unique_idx | Must be unique | Asc/Asc/Asc | companyId + status + companyVerificationMethodId |
| CompanyVerificationRequests_fraudCheckResult_idx | Performance | Asc | fraudCheckResult |
| CompanyVerificationRequests_list_filter_idx | Performance | Asc/Asc/Asc/Asc/Asc | createdAt + id + companyId + status + companyVerificationMethodId |
| CompanyVerificationRequests_new_in_progress_unique_idx | Must be unique | Asc | companyId |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| rejectionReasons_and_rejectionReasonText_check | ((((status = 'REJECTED'::"enum_CompanyVerificationRequests_status") AND ("rejectionReasons" IS NOT NULL) AND ("rejectionReasonText" IS NOT NULL)) OR ((status <> 'REJECTED'::"enum_CompanyVerificationRequests_status") AND ("rejectionReasons" IS NULL) AND ("rejectionReasonText" IS NULL)))) |
| CompanyVerificationRequests_approved_status_check | ((((status = 'APPROVED'::"enum_CompanyVerificationRequests_status") AND ("approvedAt" IS NOT NULL)) OR ((status <> 'APPROVED'::"enum_CompanyVerificationRequests_status") AND ("approvedAt" IS NULL)))) |

