table:
  schema: public
  name: challenge_day
object_relationships:
  - name: challenge_week
    using:
      foreign_key_constraint_on: challenge_week_id
array_relationships:
  - name: challenge_day_patients
    using:
      foreign_key_constraint_on:
        column: challenge_day_id
        table:
          schema: public
          name: challenge_day_patient
  - name: challenge_videos
    using:
      foreign_key_constraint_on:
        column: challenge_day_id
        table:
          schema: public
          name: challenge_video
select_permissions:
  - role: patient
    permission:
      columns:
        - id
        - challenge_week_id
        - day
        - title
        - description
        - goal
        - tip
        - icon
        - created_at
        - updated_at
      filter: {}
