{
  "created_at": "2026-07-06T07:00:00.014Z",
  "tables": {
    "users": [
      {
        "id": "50a1a103-7776-466e-9002-9065365330d6",
        "email": "admin@prosensia.pk",
        "password_hash": "$2a$10$htvhcD0XyWcCAY3IDMzlkuZBsGSJPKMf43zICzb5c0mUyp5Fr2M82",
        "created_at": "2026-06-13T15:46:04.000Z",
        "updated_at": "2026-06-13T15:46:04.000Z"
      }
    ],
    "profiles": [
      {
        "id": "50a1a103-7776-466e-9002-9065365330d6",
        "email": "admin@prosensia.pk",
        "full_name": "Admin",
        "account_type": null,
        "organization_name": "DGST",
        "phone": null,
        "city": null,
        "country": null,
        "logo_url": null,
        "onboarding_completed": 1,
        "onboarding_step": "completed",
        "created_at": "2026-06-13T15:46:04.000Z",
        "updated_at": "2026-06-13T15:46:23.000Z"
      }
    ],
    "user_roles": [
      {
        "id": "1d4ad2d5-38de-4670-a39e-6f4c84cb3258",
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "role": "admin",
        "created_at": "2026-06-13T15:46:04.000Z"
      }
    ],
    "org_members": [],
    "member_permissions": [],
    "role_permissions": [],
    "devices": [
      {
        "id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "name": "office1",
        "device_type": "light",
        "mac_address": "3C:71:BF:1C:59:E4",
        "building_id": null,
        "venue_id": null,
        "room_id": null,
        "is_on": 0,
        "rated_power_w": 60,
        "current_power_w": 0,
        "status": "offline",
        "health_score": 95,
        "schedule_mode": "manual",
        "metadata": "{\"source\":\"claim_code\",\"firmware\":\"3.1.0\"}",
        "firmware_version": null,
        "last_seen_at": "2026-06-13T16:19:52.000Z",
        "created_at": "2026-06-13T16:14:03.000Z",
        "updated_at": "2026-06-15T10:23:33.000Z"
      }
    ],
    "device_state": [
      {
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "desired_json": "{}",
        "reported_json": "{}",
        "local_ip": "116.71.8.207",
        "local_ip_seen": "2026-06-13T16:19:52.000Z",
        "last_seen": null,
        "online": 0,
        "updated_at": "2026-06-13T16:19:52.000Z"
      }
    ],
    "device_telemetry": [
      {
        "id": 1,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 11.03477669,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:14:03.000Z"
      },
      {
        "id": 2,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 1,
        "power_w": 1560,
        "energy_kwh": 0.00650114,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 7.537553787,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:14:16.000Z"
      },
      {
        "id": 3,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.00650114,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 5.51559639,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:14:33.000Z"
      },
      {
        "id": 4,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 1,
        "power_w": 780,
        "energy_kwh": 0.009750653,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 3.767551661,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:14:49.000Z"
      },
      {
        "id": 5,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 1,
        "power_w": 780,
        "energy_kwh": 0.013000383,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 3.767551661,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:15:03.000Z"
      },
      {
        "id": 6,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 1,
        "power_w": 780,
        "energy_kwh": 0.016483645,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 3.767551661,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:15:19.000Z"
      },
      {
        "id": 7,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 1,
        "power_w": 780,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 3.767551661,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:15:36.000Z"
      },
      {
        "id": 8,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 2.755921125,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:15:54.000Z"
      },
      {
        "id": 9,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 1.371160984,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:16:09.000Z"
      },
      {
        "id": 10,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0.680522859,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:16:24.000Z"
      },
      {
        "id": 11,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0.355322808,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:16:40.000Z"
      },
      {
        "id": 12,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0.17699872,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:16:59.000Z"
      },
      {
        "id": 13,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:17:13.000Z"
      },
      {
        "id": 14,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:17:28.000Z"
      },
      {
        "id": 15,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:17:45.000Z"
      },
      {
        "id": 16,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:18:00.000Z"
      },
      {
        "id": 17,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:18:16.000Z"
      },
      {
        "id": 18,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:18:32.000Z"
      },
      {
        "id": 19,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:18:48.000Z"
      },
      {
        "id": 20,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:19:05.000Z"
      },
      {
        "id": 21,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:19:20.000Z"
      },
      {
        "id": 22,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:19:37.000Z"
      },
      {
        "id": 23,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "is_on": 0,
        "power_w": 0,
        "energy_kwh": 0.019943943,
        "temperature_c": null,
        "humidity": null,
        "temp_outlet": null,
        "temp_condenser": null,
        "current_amps": 0,
        "power_factor": 0.899999976,
        "meta": null,
        "recorded_at": "2026-06-13T16:19:52.000Z"
      }
    ],
    "device_schedules": [],
    "device_calibration": [],
    "device_claim_codes": [
      {
        "id": "16d22ecb-c78f-4db4-9fad-81a812d84b93",
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "code": "ZTXH6E",
        "status": "claimed",
        "device_name": "office1",
        "device_type": "light",
        "rated_power_w": 60,
        "building_id": null,
        "venue_id": null,
        "room_id": null,
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "expires_at": "2026-06-13T20:27:19.000Z",
        "claimed_at": "2026-06-13T16:14:03.000Z",
        "created_at": "2026-06-13T16:12:19.000Z"
      }
    ],
    "device_maintenance_log": [],
    "master_overrides": [
      {
        "id": "576c3825-fdb0-4d01-8996-a0508be2b0a9",
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "master_on": 0,
        "building_states": "{\"main\":false}",
        "extra_state": "{\"_prev_master[9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed]\":true}",
        "updated_at": "2026-06-15T10:23:33.000Z"
      }
    ],
    "home_layouts": [],
    "org_setup_progress": [
      {
        "id": "e02b821f-35ae-4bb6-a5f3-1c2cfcc81318",
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "org_name": "DGST",
        "buildings": "[]",
        "current_step": 2,
        "created_at": "2026-06-13T15:46:22.000Z",
        "updated_at": "2026-06-13T15:46:22.000Z"
      }
    ],
    "notifications": [],
    "billing_settings": [],
    "admin_settings": [],
    "partner_clients": [],
    "audit_log": [],
    "backups": [
      {
        "id": 1,
        "path": "/home/prosdfwo/bustesting.pafiast.prosensia.pk/server/backups/backup-2026-06-14-07-00.json",
        "size_bytes": 16113,
        "created_at": "2026-06-14T03:00:00.000Z"
      },
      {
        "id": 2,
        "path": "/home/prosdfwo/bustesting.pafiast.prosensia.pk/server/backups/backup-2026-06-15-07-00.json",
        "size_bytes": 16339,
        "created_at": "2026-06-15T03:00:00.000Z"
      },
      {
        "id": 3,
        "path": "/home/prosdfwo/bustesting.pafiast.prosensia.pk/server/backups/backup-2026-06-23-07-00.json",
        "size_bytes": 16561,
        "created_at": "2026-06-23T03:00:00.000Z"
      },
      {
        "id": 4,
        "path": "/home/prosdfwo/bustesting.pafiast.prosensia.pk/server/backups/backup-2026-06-26-07-00.json",
        "size_bytes": 16783,
        "created_at": "2026-06-26T03:00:00.000Z"
      },
      {
        "id": 5,
        "path": "/home/prosdfwo/bustesting.pafiast.prosensia.pk/server/backups/backup-2026-06-30-07-00.json",
        "size_bytes": 17005,
        "created_at": "2026-06-30T03:00:00.000Z"
      },
      {
        "id": 6,
        "path": "/home/prosdfwo/bustesting.pafiast.prosensia.pk/server/backups/backup-2026-07-03-07-00.json",
        "size_bytes": 17227,
        "created_at": "2026-07-03T03:00:00.000Z"
      }
    ],
    "firmware_versions": [],
    "pairing_log": [
      {
        "id": 1,
        "user_id": "50a1a103-7776-466e-9002-9065365330d6",
        "mac_address": "3C:71:BF:1C:59:E4",
        "device_id": "9fc7f84b-7e54-4ca0-9d0f-3b155f4cb9ed",
        "source": "claim_code",
        "created_at": "2026-06-13T16:14:03.000Z"
      }
    ],
    "ac_telemetry": [],
    "license": [
      {
        "id": 1,
        "activated_at": "2026-06-13T19:44:59.000Z",
        "expires_at": "2026-07-13T19:44:59.000Z",
        "duration_days": 30,
        "activated_by": null,
        "hard_locked": 0,
        "failed_attempts": 0,
        "last_attempt_at": null
      }
    ],
    "license_attempts": [
      {
        "id": 1,
        "failed_attempts": 0,
        "hard_locked": 0,
        "last_attempt_at": "2026-06-13T15:41:29.000Z"
      }
    ]
  }
}