Status codes
| Status | Activity | ID | Color | 
|---|---|---|---|
| Draft | DRAFT | 0 | green | 
| Awaiting approval | DRAFT | 1 | orange | 
| Approved | OPEN | 2 | green | 
| Dismissed | CANCELLED | 3 | red | 
| Active | OPEN | 4 | green | 
| Inactive | OPEN | 5 | orange | 
| Expired | CLOSED | 6 | black | 
| Cancelled | CANCELLED | 7 | red | 
| Closed | CLOSED | 8 | black | 
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||
|---|---|---|---|---|---|---|---|---|---|---|
| ID | int4 | 10 | √ | null | 
				  
  | 
				 
				   | 
				 Contract ID  | 
				|||
| ownergroup | int4 | 10 | √ | null | 
				   | 
				 
				  
  | 
				 Owner group ID (  | 
				|||
| creator | int4 | 10 | √ | null | 
				   | 
				 
				  
  | 
				 Creator user ID (defaults to authenticated user on creation)  | 
				|||
| assigneduser | int4 | 10 | √ | null | 
				   | 
				 
				  
  | 
				 Assigned user ID  | 
				|||
| creationdate | int8 | 19 | date_part('epoch'::text, now()) | 
				   | 
				 
				   | 
				 Creation date and time as a Unix time stamp (defaults to current date and time on creation)  | 
				||||
| lastmodified | int8 | 19 | date_part('epoch'::text, now()) | 
				   | 
				 
				   | 
				 Last modification date and time as a Unix time stamp (auto-reset on modification)  | 
				||||
| account | int4 | 10 | √ | null | 
				   | 
				 
				  
  | 
				 Account ID  | 
				|||
| visibility | int2 | 5 | 0 | 
				   | 
				 
				   | 
				 Visibility (  | 
				||||
| name | text | 2147483647 | null | 
				   | 
				 
				   | 
				 Name  | 
				||||
| contractnum | text | 2147483647 | ''::text | 
				   | 
				 
				   | 
				 Contract number  | 
				||||
| datefrom | int8 | 19 | null | 
				   | 
				 
				   | 
				 Start date as a Unix time stamp; must be less than or equal to   | 
				||||
| dateto | int8 | 19 | √ | null | 
				   | 
				 
				   | 
				 End date as a Unix time stamp; must be greater than or equal to   | 
				|||
| datecancel | int8 | 19 | √ | null | 
				   | 
				 
				   | 
				 Cancellation date as a Unix time stamp  | 
				|||
| status | int2 | 5 | 0 | 
				   | 
				 
				   | 
				 Status (  | 
				||||
| currency | varchar | 3 | null | 
				   | 
				 
				   | 
				 Currency code (ISO 4217) (Pattern:   | 
				||||
| exchangerate | float8 | 17,17 | 1 | 
				   | 
				 
				   | 
				 Exchange rate as a multiple of one monetary unit of the fixed system currency  | 
				||||
| billingcycle | int2 | 5 | √ | null | 
				   | 
				 
				   | 
				 Billing cycle in months  | 
				|||
| lastbilling | int8 | 19 | √ | null | 
				   | 
				 
				   | 
				 Last billing date and time as a Unix time stamp  | 
				|||
| description | text | 2147483647 | ''::text | 
				   | 
				 
				   | 
				 Detailed general description  | 
				||||
| billingitems | json | 2147483647 | √ | null | 
				   | 
				 
				   | 
				 ||||
| autobilling | json | 2147483647 | √ | null | 
				   | 
				 
				   | 
				 ||||
| procurementitems | json | 2147483647 | √ | null | 
				   | 
				 
				   | 
				 
Table contained 0 rows
| Constraint Name | Type | Sort | Column(s) | 
|---|---|---|---|
| pk_contracts | Primary key | Asc | ID | 
| fk_contracts_account | Performance | Asc | account | 
| i_contracts_autobilling | Performance | Asc | status | 
| i_contracts_noowner | Performance | Asc | ownergroup | 
| i_contracts_owner | Performance | Asc/Asc | ownergroup + assigneduser | 
| s_contracts | Performance | Asc/Asc | name + contractnum | 

