'boolean', 'notification_enabled' => 'boolean', 'include_in_venue_stats' => 'boolean', 'maintenance_until' => 'datetime', 'sdk_port' => 'integer', 'http_port' => 'integer', 'channel' => 'integer', 'device_slot' => 'integer', 'push_timeout_seconds' => 'integer', ]; public function venue(): BelongsTo { return $this->belongsTo(Venue::class); } public function health(): HasOne { return $this->hasOne(CameraHealthState::class); } public function alerts(): HasMany { return $this->hasMany(CameraAlert::class); } public function setPlainPassword(?string $password): void { $this->password_encrypted = $password === null || $password === '' ? null : Crypt::encryptString($password); } public function plainPassword(): string { if (! $this->password_encrypted) return ''; try { return Crypt::decryptString($this->password_encrypted); } catch (\Throwable) { return ''; } } public function isInMaintenance(): bool { return $this->maintenance_until !== null && $this->maintenance_until->isFuture(); } }