workflow_case

-1 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
case_id uuid 2147483647 null
ai_candidate_decision_batch.case_id fk_ai_candidate_decision_batch_case_company R
task.case_id Implied Constraint R
company_id uuid 2147483647 null
ai_candidate_decision_batch.company_id fk_ai_candidate_decision_batch_case_company R
company.company_id fk_workflow_case_company R
user_account.company_id fk_workflow_case_created_by_company R
worker.company_id fk_workflow_case_worker_company C
worker_id uuid 2147483647 null
worker.worker_id fk_workflow_case_worker_company C
title varchar 160 null
lifecycle_status varchar 20 null
priority varchar 20 null
workflow_catalog_version varchar 80 null
workflow_snapshot_json text 2147483647 null
created_by uuid 2147483647 null
user_account.user_id fk_workflow_case_created_by_company R
created_at timestamptz 35,6 null
updated_at timestamptz 35,6 null
version int8 19 0

Indexes

Constraint Name Type Sort Column(s)
pk_workflow_case Primary key Asc case_id
idx_workflow_case_company_updated Performance Asc/Asc company_id + updated_at
idx_workflow_case_company_worker Performance Asc/Asc company_id + worker_id
uq_workflow_case_id_company Must be unique Asc/Asc case_id + company_id

Check Constraints

Constraint Name Constraint
ck_workflow_case_version ((version >= 0))
ck_workflow_case_title_not_blank ((char_length(TRIM(BOTH FROM title)) > 0))
ck_workflow_case_snapshot_not_blank ((char_length(TRIM(BOTH FROM workflow_snapshot_json)) > 0))
ck_workflow_case_updated_at ((updated_at >= created_at))
ck_workflow_case_priority (((priority)::text = ANY ((ARRAY['URGENT'::character varying, 'HIGH'::character varying, 'NORMAL'::character varying, 'LOW'::character varying])::text[])))
ck_workflow_case_catalog_version_not_blank ((char_length(TRIM(BOTH FROM workflow_catalog_version)) > 0))
ck_workflow_case_lifecycle_status (((lifecycle_status)::text = ANY ((ARRAY['ACTIVE'::character varying, 'COMPLETED'::character varying, 'CANCELLED'::character varying])::text[])))

Relationships