table:
  name: jobs
  schema: public
object_relationships:
  - name: bodyshop
    using:
      foreign_key_constraint_on: bodyshopid
array_relationships:
  - name: joblines
    using:
      foreign_key_constraint_on:
        column: jobid
        table:
          name: joblines
          schema: public
insert_permissions:
  - role: user
    permission:
      check:
        bodyshop:
          associations:
            user:
              authid:
                _eq: X-Hasura-User-Id
      columns:
        - bodyshopid
        - clm_no
        - clm_total
        - close_date
        - created_at
        - group
        - group_verified
        - id
        - ins_co_nm
        - loss_date
        - ownr_fn
        - ownr_ln
        - requires_reimport
        - ro_number
        - updated_at
        - v_age
        - v_makedesc
        - v_mileage
        - v_model
        - v_model_yr
        - v_type
        - v_vin
select_permissions:
  - role: user
    permission:
      columns:
        - bodyshopid
        - clm_no
        - clm_total
        - close_date
        - created_at
        - group
        - group_verified
        - id
        - ins_co_nm
        - loss_date
        - ownr_fn
        - ownr_ln
        - requires_reimport
        - ro_number
        - updated_at
        - v_age
        - v_makedesc
        - v_mileage
        - v_model
        - v_model_yr
        - v_type
        - v_vin
      filter:
        bodyshop:
          associations:
            user:
              authid:
                _eq: X-Hasura-User-Id
      allow_aggregations: true
update_permissions:
  - role: user
    permission:
      columns:
        - bodyshopid
        - clm_no
        - clm_total
        - close_date
        - created_at
        - group
        - group_verified
        - id
        - ins_co_nm
        - loss_date
        - ownr_fn
        - ownr_ln
        - requires_reimport
        - ro_number
        - updated_at
        - v_age
        - v_makedesc
        - v_mileage
        - v_model
        - v_model_yr
        - v_type
        - v_vin
      filter:
        bodyshop:
          associations:
            user:
              authid:
                _eq: X-Hasura-User-Id
      check: null
delete_permissions:
  - role: user
    permission:
      backend_only: false
      filter:
        bodyshop:
          associations:
            user:
              authid:
                _eq: X-Hasura-User-Id
