# SPDX-FileCopyrightText: 2026 Contributors to the CitrineOS Project
#
# SPDX-License-Identifier: Apache-2.0
table:
  name: VariableMonitorings
  schema: public
object_relationships:
  - name: ChargingStation
    using:
      foreign_key_constraint_on: stationId
  - name: Component
    using:
      foreign_key_constraint_on: componentId
  - name: Tenant
    using:
      foreign_key_constraint_on: tenantId
  - name: Variable
    using:
      foreign_key_constraint_on: variableId
array_relationships:
  - name: VariableMonitoringStatuses
    using:
      foreign_key_constraint_on:
        column: variableMonitoringId
        table:
          name: VariableMonitoringStatuses
          schema: public
select_permissions:
  - role: user
    permission:
      columns: '*'
      filter:
        tenantId:
          _eq: x-hasura-tenant-id
      allow_aggregations: true
    comment: ""
