table:
  name: bodyshops
  schema: public
array_relationships:
  - name: associations
    using:
      foreign_key_constraint_on:
        column: bodyshopid
        table:
          name: associations
          schema: public
  - name: jobs
    using:
      foreign_key_constraint_on:
        column: bodyshopid
        table:
          name: jobs
          schema: public
  - name: notifications
    using:
      foreign_key_constraint_on:
        column: bodyshopid
        table:
          name: notifications
          schema: public
select_permissions:
  - role: user
    permission:
      columns:
        - accepted_ins_co
        - channel
        - created_at
        - features
        - groups
        - id
        - ppd_diff_alert
        - shopname
        - targets
        - updated_at
      filter:
        associations:
          user:
            authid:
              _eq: X-Hasura-User-Id
update_permissions:
  - role: user
    permission:
      columns:
        - accepted_ins_co
        - groups
        - ppd_diff_alert
        - shopname
        - targets
      filter:
        associations:
          user:
            authid:
              _eq: X-Hasura-User-Id
      check: null
