Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||
| code | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||
| name | text | 2147483647 | null |
|
|
|||||||||||||||||||||||||||||||||||||||
| group_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||
| post_type | bpchar | 1 | null |
|
|
P = Post S = Settle |
||||||||||||||||||||||||||||||||||||||
| dept_type | bpchar | 1 | 'D'::bpchar |
|
|
D = Debit C = Credit |
||||||||||||||||||||||||||||||||||||||
| require_info | bool | 1 | √ | false |
|
|
||||||||||||||||||||||||||||||||||||||
| taxes | _varchar | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||
| enabled | bool | 1 | √ | true |
|
|
||||||||||||||||||||||||||||||||||||||
| tax_code | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||
| itemizers | _text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||||||||
| vat_effect | bool | 1 | true |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| department_pkey | Primary key | Asc | id |
| department_code_unq | Must be unique | Asc | code |
| department_dept_type_idx | Performance | Asc | dept_type |
| department_group_id_idx | Performance | Asc | group_id |
| department_post_type_idx | Performance | Asc | post_type |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| department_post_type_check | (post_type = ANY (ARRAY['P'::bpchar, 'S'::bpchar])) |
| department_dept_type_check | (dept_type = ANY (ARRAY['D'::bpchar, 'C'::bpchar])) |



