table:
  name: relative_invitation
  schema: public
configuration:
  column_config:
    created_at:
      custom_name: createdAt
    notification_sent:
      custom_name: notificationSent
    to_user_id:
      custom_name: toUserId
    updated_at:
      custom_name: updatedAt
    user_id:
      custom_name: userId
  custom_column_names:
    created_at: createdAt
    notification_sent: notificationSent
    to_user_id: toUserId
    updated_at: updatedAt
    user_id: userId
  custom_root_fields:
    delete: deleteManyRelativeInvitation
    delete_by_pk: deleteOneRelativeInvitation
    insert: insertManyRelativeInvitation
    insert_one: insertOneRelativeInvitation
    select: selectManyRelativeInvitation
    select_aggregate: selectAggRelativeInvitation
    select_by_pk: selectOneRelativeInvitation
    select_stream: selectStreamRelativeInvitation
    update: updateManyRelativeInvitation
    update_by_pk: updateOneRelativeInvitation
    update_many: updateBatchRelativeInvitation
object_relationships:
  - name: oneUser
    using:
      foreign_key_constraint_on: user_id
  - name: oneUserPhoneNumberRelative
    using:
      manual_configuration:
        column_mapping:
          user_id: user_id
        insertion_order: null
        remote_table:
          name: user_phone_number_relative
          schema: public
  - name: oneUserPhoneNumberRelativeAsTo
    using:
      manual_configuration:
        column_mapping:
          to_user_id: user_id
        insertion_order: null
        remote_table:
          name: user_phone_number_relative
          schema: public
select_permissions:
  - role: other
    permission:
      columns:
        - id
        - to_user_id
      filter:
        to_user_id:
          _eq: X-Hasura-User-Id
  - role: owner
    permission:
      columns:
        - id
        - user_id
      filter:
        user_id:
          _eq: X-Hasura-User-Id
delete_permissions:
  - role: owner
    permission:
      filter:
        _or:
          - user_id:
              _eq: X-Hasura-User-Id
          - to_user_id:
              _eq: X-Hasura-User-Id
    comment: ""
