mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-03-15 12:53:29 +00:00
Enhance Plugin model with device details
Added device information fields to the plugin model.
This commit is contained in:
parent
ffd1cf0d7e
commit
c45db633c0
1 changed files with 19 additions and 0 deletions
|
|
@ -441,6 +441,25 @@ class Plugin extends Model
|
||||||
'system' => [
|
'system' => [
|
||||||
'timestamp_utc' => now()->utc()->timestamp,
|
'timestamp_utc' => now()->utc()->timestamp,
|
||||||
],
|
],
|
||||||
|
'device' => [
|
||||||
|
'id' => $device->id,
|
||||||
|
'mac_address' => $device->mac_address,
|
||||||
|
'name' => $device->name,
|
||||||
|
'friendly_id' => $device->friendly_id,
|
||||||
|
'last_rssi_level' => $device->last_rssi_level,
|
||||||
|
'last_battery_voltage' => $device->last_battery_voltage,
|
||||||
|
'last_firmware_version' => $device->last_firmware_version,
|
||||||
|
'battery_percent' => $device->battery_percent,
|
||||||
|
'wifi_strength' => $device->wifi_strength,
|
||||||
|
'current_screen_image' => $device->current_screen_image,
|
||||||
|
'default_refresh_interval' => $device->default_refresh_interval,
|
||||||
|
'sleep_mode_enabled' => $device->sleep_mode_enabled,
|
||||||
|
'sleep_mode_from' => $device->sleep_mode_from,
|
||||||
|
'sleep_mode_to' => $device->sleep_mode_to,
|
||||||
|
'special_function' => $device->special_function,
|
||||||
|
'pause_until' => $device->pause_until,
|
||||||
|
'updated_at' => $device->updated_at,
|
||||||
|
],
|
||||||
'user' => [
|
'user' => [
|
||||||
'utc_offset' => $utcOffset,
|
'utc_offset' => $utcOffset,
|
||||||
'name' => $this->user->name ?? 'Unknown User',
|
'name' => $this->user->name ?? 'Unknown User',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue