table:
  name: joblines
  schema: public
object_relationships:
  - name: job
    using:
      foreign_key_constraint_on: jobid
insert_permissions:
  - role: user
    permission:
      check:
        job:
          bodyshop:
            associations:
              user:
                authid:
                  _eq: X-Hasura-User-Id
      columns:
        - act_price
        - created_at
        - db_price
        - db_ref
        - id
        - ignore
        - jobid
        - lbr_amt
        - line_desc
        - line_ind
        - line_no
        - misc_amt
        - mod_lb_hrs
        - mod_lbr_ty
        - oem_partno
        - part_qty
        - part_type
        - price_diff
        - price_diff_pc
        - unq_seq
        - updated_at
select_permissions:
  - role: user
    permission:
      columns:
        - act_price
        - created_at
        - db_price
        - db_ref
        - id
        - ignore
        - jobid
        - line_desc
        - line_ind
        - line_no
        - oem_partno
        - part_qty
        - part_type
        - price_diff
        - price_diff_pc
        - unq_seq
        - updated_at
      filter:
        job:
          bodyshop:
            associations:
              user:
                authid:
                  _eq: X-Hasura-User-Id
update_permissions:
  - role: user
    permission:
      columns:
        - act_price
        - created_at
        - db_price
        - db_ref
        - id
        - ignore
        - jobid
        - lbr_amt
        - line_desc
        - line_ind
        - line_no
        - misc_amt
        - mod_lb_hrs
        - mod_lbr_ty
        - oem_partno
        - part_qty
        - part_type
        - price_diff
        - price_diff_pc
        - unq_seq
        - updated_at
      filter:
        job:
          bodyshop:
            associations:
              user:
                authid:
                  _eq: X-Hasura-User-Id
      check: null
delete_permissions:
  - role: user
    permission:
      backend_only: false
      filter:
        job:
          bodyshop:
            associations:
              user:
                authid:
                  _eq: X-Hasura-User-Id
