Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ai_question_id | uuid | 2147483647 | null |
|
|
||||||||||||
| ai_run_id | uuid | 2147483647 | null |
|
|
||||||||||||
| ai_attempt_id | uuid | 2147483647 | null |
|
|
||||||||||||
| company_id | uuid | 2147483647 | null |
|
|
||||||||||||
| slot_key | varchar | 100 | null |
|
|
||||||||||||
| label | varchar | 500 | null |
|
|
||||||||||||
| input_type | varchar | 30 | 'TEXT'::character varying |
|
|
||||||||||||
| required | bool | 1 | true |
|
|
||||||||||||
| answer_value | varchar | 2000 | √ | null |
|
|
|||||||||||
| answered_by | uuid | 2147483647 | √ | null |
|
|
|||||||||||
| answered_at | timestamptz | 35,6 | √ | null |
|
|
|||||||||||
| created_at | timestamptz | 35,6 | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_ai_question | Primary key | Asc | ai_question_id |
| idx_ai_question_run | Performance | Asc/Asc | company_id + ai_run_id |
| uq_ai_question_attempt_slot | Must be unique | Asc/Asc | ai_attempt_id + slot_key |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ck_ai_question_input_type | (((input_type)::text = ANY ((ARRAY['TEXT'::character varying, 'DATE'::character varying, 'NUMBER'::character varying, 'SELECT'::character varying])::text[]))) |
| ck_ai_question_slot_not_blank | ((char_length(TRIM(BOTH FROM slot_key)) > 0)) |
| ck_ai_question_label_not_blank | ((char_length(TRIM(BOTH FROM label)) > 0)) |
| ck_ai_question_answer | ((((answer_value IS NULL) AND (answered_by IS NULL) AND (answered_at IS NULL)) OR ((answer_value IS NOT NULL) AND (answered_by IS NOT NULL) AND (answered_at IS NOT NULL)))) |



