# Deel schema ERD

Table and field reference for the Fivetran Deel connector.

## Table & Field Reference

### country_state

| Column | Type | Keys |
| --- | --- | --- |
| code | Unknown | PK |
| country_code | Unknown | PK, FK |
| name | Unknown |  |

### country

| Column | Type | Keys |
| --- | --- | --- |
| code | Unknown | PK |
| default_currency | Unknown |  |
| eor_support | Unknown |  |
| name | Unknown |  |
| state_type | Unknown |  |
| visa_support | Unknown |  |

### organization_structure_role

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| organization_structure_id | Unknown | PK, FK |
| name | Unknown |  |

### organization_structure_team

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| organization_structure_id | Unknown | PK, FK |
| children | Json |  |
| created_at | Unknown |  |
| external_id | Unknown |  |
| name | Unknown |  |
| name_route | Unknown |  |
| parent | Unknown |  |

### organization_structure

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_at | Unknown |  |
| enable_role | Unknown |  |
| external_id | Unknown |  |
| is_multiselect | Unknown |  |
| name | Unknown |  |
| type | Unknown |  |

### people_custom_field

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_at | Unknown |  |
| description | Unknown |  |
| name | Unknown |  |
| placement | Unknown |  |
| type_currency | Unknown |  |
| type_is_fixed | Unknown |  |
| type_name | Unknown |  |
| type_option | Unknown |  |

### contract_amendment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contract_id | Unknown | PK, FK |
| contract_name | Unknown |  |
| contract_type | Unknown |  |
| created_at | Unknown |  |
| currency_code | Unknown |  |
| effective_date | Unknown |  |
| rate | Unknown |  |
| scale | Unknown |  |
| sign_status | Unknown |  |
| status | Unknown |  |
| updated_at | Unknown |  |

### currency

| Column | Type | Keys |
| --- | --- | --- |
| code | Unknown | PK |
| name | Unknown |  |

### legal_entity

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| address_city | Unknown |  |
| address_country | Unknown |  |
| address_state | Unknown |  |
| address_street | Unknown |  |
| address_zip | Unknown |  |
| archived_at | Unknown |  |
| country | Unknown |  |
| created_at | Unknown |  |
| entity_subtype | Unknown |  |
| industry_name | Unknown |  |
| name | Unknown |  |
| phone | Unknown |  |
| registration_number | Unknown |  |
| sic_number | Unknown |  |
| type | Unknown |  |
| updated_at | Unknown |  |
| vat_id | Unknown |  |

### contract_payment_cycle

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contract_id | Unknown | PK, FK |
| due_date | Unknown |  |
| status | Unknown |  |

### invoice_adjustment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contract_id | Unknown | FK |
| attachment_filename | Unknown |  |
| attachment_key | Unknown |  |
| created_at | Unknown |  |
| currency_code | Unknown |  |
| custom_scale | Unknown |  |
| date_submitted | Unknown |  |
| description | Unknown |  |
| hourly_report_preset_id | Unknown |  |
| hourly_report_preset_rate | Unknown |  |
| hourly_report_preset_title | Unknown |  |
| invoice_id | Unknown |  |
| payment_cycle_end_date | Unknown |  |
| payment_cycle_start_date | Unknown |  |
| quantity | Unknown |  |
| reported_by_full_name | Unknown |  |
| reported_by_id | Unknown |  |
| reviewed_by_full_name | Unknown |  |
| reviewed_by_id | Unknown |  |
| reviewed_by_remark | Unknown |  |
| reviewed_by_reviewed_at | Unknown |  |
| scale | Unknown |  |
| status | Unknown |  |
| total_amount | Unknown |  |
| type | Unknown |  |
| worksheet_day | Unknown |  |
| worksheet_hour | Unknown |  |
| worksheet_minute | Unknown |  |
| worksheet_week | Unknown |  |

### legal_entity_cost_center

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| legal_entity_id | Unknown | PK, FK |
| created_at | Unknown |  |
| name | Unknown |  |
| number | Unknown |  |
| updated_at | Unknown |  |

### job_title

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### policy

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### contract_adjustment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contract_id | Unknown | PK, FK |
| adjustment_category_id | Unknown | FK |
| actual_end_cycle_date | Unknown |  |
| actual_start_cycle_date | Unknown |  |
| amount | Unknown |  |
| created_at | Unknown |  |
| cycle_reference | Unknown |  |
| date_of_adjustment | Unknown |  |
| description | Unknown |  |
| file_id | Unknown |  |
| file_name | Unknown |  |
| file_type | Unknown |  |
| move_next_cycle | Unknown |  |
| status | Unknown |  |
| title | Unknown |  |
| updated_at | Unknown |  |

### manager

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| email | Unknown |  |
| first_name | Unknown |  |
| last_name | Unknown |  |

### contract_worker_alternate_email

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| contract_id | Unknown | PK, FK |
| email | Unknown |  |
| is_verified | Unknown |  |

### contract

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| worker_id | Unknown | FK |
| block_contract_countersign_until_deposit_paid | Unknown |  |
| client_team_id | Unknown |  |
| client_team_name | Unknown |  |
| cost_center_allocation_percentage | Unknown |  |
| cost_center_name | Unknown |  |
| cost_center_number | Unknown |  |
| created_at | Unknown |  |
| external_id | Unknown |  |
| invitation_client_email | Unknown |  |
| invitation_worker_email | Unknown |  |
| is_archived | Unknown |  |
| is_shielded | Unknown |  |
| location | Unknown |  |
| notice_period | Unknown |  |
| product_area | Unknown |  |
| scale | Unknown |  |
| signature_client_signed_at | Unknown |  |
| signature_worker_signature | Unknown |  |
| signature_worker_signed_at | Unknown |  |
| status | Unknown |  |
| termination_date | Unknown |  |
| title | Unknown |  |
| type | Unknown |  |
| updated_at | Unknown |  |
| who_report | Unknown |  |
| worker_image | Unknown |  |

### groups

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| archived_at | Unknown |  |
| created_at | Unknown |  |
| department | Unknown |  |
| location | Unknown |  |
| managers | Unknown |  |
| name | Unknown |  |
| status | Unknown |  |
| updated_at | Instant |  |

### contract_custom_field

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| created_at | Unknown |  |
| description | Unknown |  |
| name | Unknown |  |
| placement | Unknown |  |
| type_currency | Unknown |  |
| type_is_fixed | Unknown |  |
| type_name | Unknown |  |
| type_option | Unknown |  |

### profile_entitlement_event

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |
| profile_entitlement_id | Unknown | PK, FK |
| policy_id | Unknown | FK |
| accrual_date | Unknown |  |
| amount | Unknown |  |
| created_at | Unknown |  |
| description | Unknown |  |
| event_date | Unknown |  |
| expiration_date | Unknown |  |
| profile_id | Unknown |  |
| rollover_tracking_period | Unknown |  |
| time_off_id | Unknown |  |
| tracking_period | Unknown |  |
| type | Unknown |  |
| updated_at | Unknown |  |

### profile_entitlement_policy_time_off_type

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |
| profile_entitlement_id | Unknown | PK, FK |
| name | Unknown |  |

### profile_entitlement_rollover

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| people_id | Unknown | PK, FK |
| profile_entitlement_id | Unknown | PK, FK |
| amount | Unknown |  |
| expiration_date | Unknown |  |
| rollover_tracking_period | Unknown |  |

### profile_entitlement_future_event

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |
| profile_entitlement_id | Unknown | PK, FK |
| policy_id | Unknown | FK |
| accrual_date | Unknown |  |
| amount | Unknown |  |
| created_at | Unknown |  |
| description | Unknown |  |
| event_date | Unknown |  |
| expiration_date | Unknown |  |
| profile_id | Unknown |  |
| rollover_tracking_period | Unknown |  |
| time_off_id | Unknown |  |
| tracking_period | Unknown |  |
| type | Unknown |  |
| updated_at | Unknown |  |

### profile_entitlement

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |
| policy_id | Unknown | FK |
| accrual_amount | Unknown |  |
| accrual_unit | Unknown |  |
| accrued | Unknown |  |
| allowance | Unknown |  |
| approved | Unknown |  |
| available | Unknown |  |
| balance_adjusted | Unknown |  |
| expired | Unknown |  |
| is_allowance_unlimited | Unknown |  |
| past_tracking_periods | Json |  |
| policy_created_at | Unknown |  |
| policy_description | Unknown |  |
| policy_leave_type | Unknown |  |
| policy_tracking_cadence | Unknown |  |
| policy_tracking_start_date | Unknown |  |
| policy_tracking_unit | Unknown |  |
| policy_tracking_unit_amount | Unknown |  |
| policy_type_id | Unknown |  |
| policy_type_name | Unknown |  |
| policy_updated_at | Unknown |  |
| requested | Unknown |  |
| time_off_event_id | Unknown |  |
| total_entitlements | Unknown |  |
| tracking_period | Unknown |  |
| tracking_period_end_date | Unknown |  |
| upcoming_accruals | Unknown |  |
| used | Unknown |  |

### people_email

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| people_id | Unknown | PK, FK |
| type | Unknown |  |
| value | Unknown |  |

### people_address

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| people_id | Unknown | PK, FK |
| country | Unknown |  |
| locality | Unknown |  |
| postal_code | Unknown |  |
| region | Unknown |  |
| street_address | Unknown |  |

### people_employment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |
| band_placement | Unknown |  |
| comparative_ratio | Unknown |  |
| compensation_band_id | Unknown |  |
| contract_coverage | Unknown |  |
| contract_has_contractor | Unknown |  |
| contract_is_archived | Unknown |  |
| contract_status | Unknown |  |
| email | Unknown |  |
| has_eor_termination | Unknown |  |
| hris_direct_employee_invitation_oid | Unknown |  |
| hris_direct_employee_invitation_send_at | Unknown |  |
| hris_direct_employee_invitation_status | Unknown |  |
| hris_direct_employee_invitation_timezone | Unknown |  |
| is_ended | Unknown |  |
| is_user_contract_deleted | Unknown |  |
| name | Unknown |  |
| payment_contract_name | Unknown |  |
| payment_currency | Unknown |  |
| payment_rate | Unknown |  |
| payment_scale | Unknown |  |
| state | Unknown |  |
| team_id | Unknown |  |
| team_name | Unknown |  |
| timezone | Unknown |  |
| voluntarily_left | Unknown |  |
| work_email | Unknown |  |

### people_direct_report

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |

### people

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| client_legal_entity_id | Unknown | FK |
| direct_manager_id | Unknown | FK |
| active_worker_termination_status | Unknown |  |
| birth_date | Unknown |  |
| completion_date | Unknown |  |
| country | Unknown |  |
| created_at | Unknown |  |
| department_id | Unknown |  |
| department_name | Unknown |  |
| department_parent | Unknown |  |
| direct_manager_worker_id | Unknown |  |
| external_id | Unknown |  |
| first_name | Unknown |  |
| full_name | Unknown |  |
| hiring_status | Unknown |  |
| hiring_type | Unknown |  |
| hris_organization_user_id | Unknown |  |
| is_pwac | Unknown |  |
| job_title | Unknown |  |
| last_name | Unknown |  |
| nationalities | Json |  |
| new_hiring_status | Unknown |  |
| preferred_first_name | Unknown |  |
| preferred_last_name | Unknown |  |
| seniority | Unknown |  |
| start_date | Unknown |  |
| state | Unknown |  |
| termination_last_day | Unknown |  |
| timezone | Unknown |  |
| updated_at | Unknown |  |
| work_location | Unknown |  |
| worker_id | Unknown |  |

### contract_milestone

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contract_id | Unknown | PK, FK |
| amount | Unknown |  |
| approval_requested | Unknown |  |
| created_at | Unknown |  |
| description | Unknown |  |
| reported_by_full_name | Unknown |  |
| reported_by_id | Unknown |  |
| reviewed_by_full_name | Unknown |  |
| reviewed_by_id | Unknown |  |
| status | Unknown |  |
| title | Unknown |  |

### payslip

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| people_id | Unknown | PK, FK |
| period_from | Unknown |  |
| period_to | Unknown |  |
| status | Unknown |  |

### organization

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| name | Unknown |  |

### order_item

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| order_id | Unknown | PK, FK |
| acquisition_type | Unknown |  |
| asset_price_amount | Unknown |  |
| asset_price_currency | Unknown |  |
| is_approved | Unknown |  |
| is_express_delivery_requested | Unknown |  |
| product_brand | Unknown |  |
| product_category | Unknown |  |
| product_id | Unknown |  |
| product_name | Unknown |  |
| status | Unknown |  |
| storefront_fee_amount | Unknown |  |
| storefront_fee_currency | Unknown |  |

### orders

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| user_hris_profile_id | Unknown | FK |
| created_at | Unknown |  |
| delivery_address_city | Unknown |  |
| delivery_address_country | Unknown |  |
| delivery_address_date_of_birth | Unknown |  |
| delivery_address_delivery_instruction | Unknown |  |
| delivery_address_id | Unknown |  |
| delivery_address_is_valid | Unknown |  |
| delivery_address_line_1 | Unknown |  |
| delivery_address_line_2 | Unknown |  |
| delivery_address_passport_number | Unknown |  |
| delivery_address_phone_number | Unknown |  |
| delivery_address_post_code | Unknown |  |
| delivery_address_state | Unknown |  |
| delivery_address_tax_id_number | Unknown |  |
| delivery_address_type | Unknown |  |
| status | Unknown |  |
| updated_at | Unknown |  |
| user_address_city | Unknown |  |
| user_address_delivery_instruction | Unknown |  |
| user_address_id | Unknown |  |
| user_address_is_valid | Unknown |  |
| user_address_line_1 | Unknown |  |
| user_address_line_2 | Unknown |  |
| user_address_passport_number | Unknown |  |
| user_address_phone_number | Unknown |  |
| user_address_state | Unknown |  |
| user_address_tax_id_number | Unknown |  |
| user_address_type | Unknown |  |

### contract_off_cycle_payment

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| contract_id | Unknown | PK, FK |
| amount | Unknown |  |
| created_at | Unknown |  |
| currency_code | Unknown |  |
| date_submitted | Unknown |  |
| description | Unknown |  |
| reported_by_full_name | Unknown |  |
| reported_by_id | Unknown |  |
| status | Unknown |  |

### asset

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| assigned_user_hris_profile_id | Unknown | FK |
| assigned_user_address_city | Unknown |  |
| assigned_user_address_delivery_instruction | Unknown |  |
| assigned_user_address_id | Unknown |  |
| assigned_user_address_is_valid | Unknown |  |
| assigned_user_address_line_1 | Unknown |  |
| assigned_user_address_line_2 | Unknown |  |
| assigned_user_address_passport_number | Unknown |  |
| assigned_user_address_phone_number | Unknown |  |
| assigned_user_address_state | Unknown |  |
| assigned_user_address_tax_id_number | Unknown |  |
| assigned_user_address_type | Unknown |  |
| assigned_warehouse_address_city | Unknown |  |
| assigned_warehouse_address_country | Unknown |  |
| assigned_warehouse_address_date_of_birth | Unknown |  |
| assigned_warehouse_address_delivery_instruction | Unknown |  |
| assigned_warehouse_address_id | Unknown |  |
| assigned_warehouse_address_is_valid | Unknown |  |
| assigned_warehouse_address_line_1 | Unknown |  |
| assigned_warehouse_address_line_2 | Unknown |  |
| assigned_warehouse_address_passport_number | Unknown |  |
| assigned_warehouse_address_phone_number | Unknown |  |
| assigned_warehouse_address_post_code | Unknown |  |
| assigned_warehouse_address_state | Unknown |  |
| assigned_warehouse_address_tax_id_number | Unknown |  |
| assigned_warehouse_address_type | Unknown |  |
| assigned_warehouse_id | Unknown |  |
| assigned_warehouse_name | Unknown |  |
| assigned_warehouse_ownership | Unknown |  |
| assigned_warehouse_warehouse_type | Unknown |  |
| created_at | Unknown |  |
| grade | Unknown |  |
| location | Unknown |  |
| ownership_name | Unknown |  |
| ownership_type | Unknown |  |
| product_brand | Unknown |  |
| product_category | Unknown |  |
| product_id | Unknown |  |
| product_name | Unknown |  |
| purchase_date | Unknown |  |
| purchase_value_amount | Unknown |  |
| purchase_value_currency | Unknown |  |
| serial_number | Unknown |  |
| status | Unknown |  |
| updated_at | Unknown |  |

### adjustment_category

| Column | Type | Keys |
| --- | --- | --- |
| id | Unknown | PK |
| label | Unknown |  |
| name | Unknown |  |
| unit_type | Unknown |  |

## Relationships

- country_state(country_code) → country(code)
- organization_structure_role(organization_structure_id) → organization_structure(id)
- organization_structure_team(organization_structure_id) → organization_structure(id)
- contract_amendment(contract_id) → contract(id)
- contract_payment_cycle(contract_id) → contract(id)
- invoice_adjustment(contract_id) → contract(id)
- legal_entity_cost_center(legal_entity_id) → legal_entity(id)
- contract_adjustment(adjustment_category_id) → adjustment_category(id)
- contract_adjustment(contract_id) → contract(id)
- contract_worker_alternate_email(contract_id) → contract(id)
- contract(worker_id) → people(id)
- profile_entitlement_event(policy_id) → policy(id)
- profile_entitlement_event(people_id) → profile_entitlement(people_id)
- profile_entitlement_event(profile_entitlement_id) → profile_entitlement(id)
- profile_entitlement_policy_time_off_type(people_id) → profile_entitlement(people_id)
- profile_entitlement_policy_time_off_type(profile_entitlement_id) → profile_entitlement(id)
- profile_entitlement_rollover(people_id) → profile_entitlement(people_id)
- profile_entitlement_rollover(profile_entitlement_id) → profile_entitlement(id)
- profile_entitlement_future_event(policy_id) → policy(id)
- profile_entitlement_future_event(people_id) → profile_entitlement(people_id)
- profile_entitlement_future_event(profile_entitlement_id) → profile_entitlement(id)
- profile_entitlement(policy_id) → policy(id)
- profile_entitlement(people_id) → people(id)
- people_email(people_id) → people(id)
- people_address(people_id) → people(id)
- people_employment(people_id) → people(id)
- people_direct_report(people_id) → people(id)
- people(client_legal_entity_id) → legal_entity(id)
- people(direct_manager_id) → manager(id)
- contract_milestone(contract_id) → contract(id)
- payslip(people_id) → people(id)
- order_item(order_id) → orders(id)
- orders(user_hris_profile_id) → people(id)
- contract_off_cycle_payment(contract_id) → contract(id)
- asset(assigned_user_hris_profile_id) → people(id)
