Files
twenty/hasura/metadata/databases/default/tables/public_companies.yaml
Anders Borch d4b1b2f661 Companies table (#79)
* Add columns to companies:
* account_owner_id
* employees
* address

Add foreign key constraint companies_account_owner_id_fkey
to auth.users.id

* Add select permissions to:
* account_owner_id
* employees
* address

Add relationship between companies and auth.users.

* Update Companies interface to include:
* account_owner_id
* employees
* address

Opportunity is expected to be replace by actual opportunity in a separate PR.

* Add GetCompanies query

* Add initial companies table

* Update test to use mock apollo provider

* Update to match changed company column names

* Add company interface mapping tests

* Test entire object

* Add test for companies being rendered in table.

* Add test for sorting reduce.

* Fix prettier errors
2023-04-27 12:46:43 +02:00

74 lines
1.5 KiB
YAML

table:
name: companies
schema: public
object_relationships:
- name: account_owner
using:
manual_configuration:
column_mapping:
account_owner_id: id
insertion_order: null
remote_table:
name: users
schema: auth
- name: workspace
using:
foreign_key_constraint_on: workspace_id
insert_permissions:
- role: user
permission:
check:
workspace_id:
_eq: x-hasura-workspace-id
columns:
- id
- workspace_id
- account_owner_id
- address
- employees
- name
- domain_name
- created_at
- updated_at
- deleted_at
select_permissions:
- role: user
permission:
columns:
- domain_name
- name
- account_owner_id
- address
- employees
- created_at
- deleted_at
- updated_at
- id
- workspace_id
filter:
workspace_id:
_eq: x-hasura-workspace-id
update_permissions:
- role: user
permission:
columns:
- domain_name
- name
- employees
- address
- account_owner_id
- created_at
- deleted_at
- updated_at
- id
- workspace_id
filter:
workspace_id:
_eq: x-hasura-workspace-id
check: null
delete_permissions:
- role: user
permission:
filter:
workspace_id:
_eq: x-hasura-workspace-id