Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| company_id | uuid | 2147483647 | null |
|
|
||||||
| approval_policy | varchar | 30 | 'ADMIN_OR_HR'::character varying |
|
|
||||||
| link_expiry_hours | int8 | 19 | 72 |
|
|
||||||
| evidence_rules_json | text | 2147483647 | '{}'::text |
|
|
||||||
| file_retention_days | int4 | 10 | 365 |
|
|
||||||
| ai_log_retention_days | int4 | 10 | 90 |
|
|
||||||
| audit_visibility | varchar | 30 | 'ADMIN_ONLY'::character varying |
|
|
||||||
| created_at | timestamptz | 35,6 | CURRENT_TIMESTAMP |
|
|
||||||
| updated_at | timestamptz | 35,6 | CURRENT_TIMESTAMP |
|
|
||||||
| version | int8 | 19 | 0 |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_company_settings | Primary key | Asc | company_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| ck_company_settings_time_order | ((updated_at >= created_at)) |
| ck_company_settings_evidence_rules_json_not_blank | ((char_length(TRIM(BOTH FROM evidence_rules_json)) > 0)) |
| ck_company_settings_file_retention_days | (((file_retention_days >= 30) AND (file_retention_days <= 3650))) |
| ck_company_settings_link_expiry_hours | (((link_expiry_hours >= 1) AND (link_expiry_hours <= 168))) |
| ck_company_settings_ai_log_retention_days | (((ai_log_retention_days >= 7) AND (ai_log_retention_days <= 365))) |
| ck_company_settings_audit_visibility | (((audit_visibility)::text = ANY ((ARRAY['ADMIN_ONLY'::character varying, 'ADMIN_AND_HR'::character varying])::text[]))) |
| ck_company_settings_approval_policy | (((approval_policy)::text = ANY ((ARRAY['ADMIN_ONLY'::character varying, 'ADMIN_OR_HR'::character varying])::text[]))) |
| ck_company_settings_version | ((version >= 0)) |

