# Tempo schema ERD

Table and field reference for the Fivetran Tempo connector.

## Table & Field Reference

### timesheet_approval

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| team_id | Long | FK |
| period_from | String |  |
| period_to | String |  |
| required_seconds | Long |  |
| reviewer_account_id | String |  |
| status_account_id | String |  |
| status_comment | String |  |
| status_key | String |  |
| status_required_seconds_at_submit | Long |  |
| status_time_spent_seconds_at_submit | Long |  |
| status_updated_at | Instant |  |
| time_spent_seconds | Long |  |
| user_account_id | String |  |

### role

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| is_default | Boolean |  |
| name | String |  |

### holiday_member

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| holiday_scheme_id | Long | FK |
| account_id | String |  |

### global_configuration

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| allow_logging_on_closed_account | Boolean |  |
| approval_period | String |  |
| approval_week_start | Long |  |
| max_hours_per_day_per_user | Long |  |
| number_of_days_allowed_into_future | Long |  |
| remaining_estimate_optional | Boolean |  |
| week_start | Long |  |
| worklog_description_optional | Boolean |  |

### timesheet_reviewer

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| account_id | Long | FK |
| reviewer_account_id | String |  |

### workload_member

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| workload_scheme_id | Long | FK |
| account_id | String |  |

### team_membership

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| role_id | Long | FK |
| team_id | Long | FK |
| commitment_percent | Long |  |
| from_date | Unknown |  |
| member_account_id | String |  |
| to_date | Unknown |  |

### program_team_value

| Column | Type | Keys |
| --- | --- | --- |
| program_id | Long | PK, FK |
| team_id | Long | PK, FK |

### program

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| manager_account_id | String |  |
| name | String |  |

### work_attribute

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| name | String |  |
| required | Boolean |  |
| some_value | String |  |
| type | String |  |
| values | Json |  |

### holiday

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| scheme_id | Long | FK |
| date | LocalDate |  |
| description | String |  |
| duration_seconds | Long |  |
| name | String |  |
| type | String |  |

### generic_resource

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| team_id | Long | FK |
| name | String |  |

### plan_period_value

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| plan_id | Long | FK |
| from_date | Unknown |  |
| planned_seconds | Long |  |
| to_date | Unknown |  |

### planned_time_day_value

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| plan_id | Long | FK |
| date | LocalDate |  |
| planned_seconds | Long |  |

### plan

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| assignee_id | String |  |
| assignee_type | String |  |
| created_at | Instant |  |
| description | String |  |
| effort_persistence_type | String |  |
| end_date | LocalDate |  |
| include_non_working_days | Boolean |  |
| period_count | Long |  |
| plan_approval_account_id | String |  |
| plan_approval_status | String |  |
| plan_creator_id | String |  |
| plan_item_id | Int |  |
| plan_item_type | String |  |
| planned_seconds_per_day | Long |  |
| planned_time_day_count | Long |  |
| recurrence_end_date | LocalDate |  |
| rule | String |  |
| start_date | LocalDate |  |
| start_time | String |  |
| total_planned_seconds | Long |  |
| total_planned_seconds_in_scope | Long |  |
| updated_at | Instant |  |

### user_schedule

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| holiday_id | Long | FK |
| scheme_id | Long | FK |
| date | LocalDate |  |
| required_seconds | Long |  |
| type | String |  |

### workload_scheme_day

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| workload_scheme_id | Long | FK |
| day | String |  |
| required_seconds | Long |  |

### workload_scheme

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| default_scheme | Boolean |  |
| description | String |  |
| member_count | Long |  |
| name | String |  |

### holiday_scheme

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| default_scheme | Boolean |  |
| description | String |  |
| member_count | Long |  |
| name | String |  |

### worklog_audit_description

| Column | Type | Keys |
| --- | --- | --- |
| index | Unknown | PK |
| worklog_audit_entity_id | Unknown | FK |
| worklog_audit_worklog_timestamp | Unknown | FK |
| change_field | String |  |
| new_value | String |  |
| previous_value | String |  |

### worklog_audit

| Column | Type | Keys |
| --- | --- | --- |
| entity_id | Unknown | PK |
| worklog_timestamp | Unknown | PK |
| action | Unknown |  |
| author | Unknown |  |
| parent_id | Unknown |  |
| worker | Unknown |  |

### team

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| program_id | Long | FK |
| lead_account_id | String |  |
| name | String |  |
| summary | String |  |

### global_permission_access_entity

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| global_permission_role_id | Long | PK, FK |

### global_permission

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| global_permission_role_id | Long | PK, FK |

### global_permitted_user

| Column | Type | Keys |
| --- | --- | --- |
| account_id | String | PK |
| global_permission_role_id | Long | PK, FK |

### global_permission_role

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| access_type | String |  |
| editable | Boolean |  |
| name | String |  |

### worklog_attribute_value

| Column | Type | Keys |
| --- | --- | --- |
| _fivetran_id | String | PK |
| key | String | FK |
| worklog_worklog_id | Long | FK |
| value | String |  |

### worklog

| Column | Type | Keys |
| --- | --- | --- |
| worklog_id | Long | PK |
| author_account_id | String |  |
| billable_seconds | Long |  |
| created_at | Instant |  |
| description | String |  |
| issue_id | Long |  |
| issue_key | String |  |
| jira_worklog_id | Long |  |
| start_date | LocalDate |  |
| start_time | String |  |
| time_spent_seconds | Long |  |
| updated_at | Instant |  |

### permission_access_entity

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| permission_role_id | Long | FK |

### permission

| Column | Type | Keys |
| --- | --- | --- |
| key | String | PK |
| permission_role_id | Long | FK |

### permission_role

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| access_type | String |  |
| editable | Boolean |  |
| name | String |  |
| permitted_account_id | String |  |

### account

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| customer_id | Long | FK |
| category_id | Long |  |
| category_key | String |  |
| category_name | String |  |
| category_type_name | String |  |
| contact_account_id | String |  |
| contact_type | String |  |
| global | Boolean |  |
| key | String |  |
| lead_account_id | String |  |
| monthly_budget | Long |  |
| name | String |  |
| status | String |  |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| id | Long | PK |
| key | String |  |
| name | String |  |

## Relationships

- timesheet_approval(team_id) → team(id)
- holiday_member(holiday_scheme_id) → holiday_scheme(id)
- timesheet_reviewer(account_id) → account(id)
- workload_member(workload_scheme_id) → workload_scheme(id)
- team_membership(team_id) → team(id)
- team_membership(role_id) → role(id)
- program_team_value(team_id) → team(id)
- program_team_value(program_id) → program(id)
- holiday(scheme_id) → holiday_scheme(id)
- generic_resource(team_id) → team(id)
- plan_period_value(plan_id) → plan(id)
- planned_time_day_value(plan_id) → plan(id)
- user_schedule(holiday_id) → holiday(id)
- user_schedule(scheme_id) → holiday_scheme(id)
- workload_scheme_day(workload_scheme_id) → workload_scheme(id)
- worklog_audit_description(worklog_audit_worklog_timestamp) → worklog_audit(worklog_timestamp)
- worklog_audit_description(worklog_audit_entity_id) → worklog_audit(entity_id)
- team(program_id) → program(id)
- global_permission_access_entity(global_permission_role_id) → global_permission_role(id)
- global_permission(global_permission_role_id) → global_permission_role(id)
- global_permitted_user(global_permission_role_id) → global_permission_role(id)
- worklog_attribute_value(key) → work_attribute(key)
- worklog_attribute_value(worklog_worklog_id) → worklog(worklog_id)
- permission_access_entity(permission_role_id) → permission_role(id)
- permission(permission_role_id) → permission_role(id)
- account(customer_id) → customer(id)
