setTable('edge_gateway_shell_sessions'); } public function getObjectProperties(): void { $this->gateway_id = new object_property($this->table, $this->id, 'gateway_id', 'int', false); $this->department_id = new object_property($this->table, $this->id, 'department_id', 'int', false); $this->actor_user_id = new object_property($this->table, $this->id, 'actor_user_id', 'int', false); $this->session_token_hash = new object_property($this->table, $this->id, 'session_token_hash', 'string', false); $this->status = new object_property($this->table, $this->id, 'status', 'string', false); $this->reason = new object_property($this->table, $this->id, 'reason', 'string', false); $this->connection_id = new object_property($this->table, $this->id, 'connection_id', 'string', false); $this->cwd = new object_property($this->table, $this->id, 'cwd', 'string', false); $this->shell_command = new object_property($this->table, $this->id, 'shell_command', 'string', false); $this->shell_args_json = new object_property($this->table, $this->id, 'shell_args_json', 'json', false); $this->cols = new object_property($this->table, $this->id, 'cols', 'int', false); $this->rows = new object_property($this->table, $this->id, 'terminal_rows', 'int', false); $this->transcript = new object_property($this->table, $this->id, 'transcript', 'text', false); $this->metadata_json = new object_property($this->table, $this->id, 'metadata_json', 'json', false); $this->expires_at = new object_property($this->table, $this->id, 'expires_at', 'string', false); $this->approved_at = new object_property($this->table, $this->id, 'approved_at', 'string', false); $this->opened_at = new object_property($this->table, $this->id, 'opened_at', 'string', false); $this->closed_at = new object_property($this->table, $this->id, 'closed_at', 'string', false); $this->created_at = new object_property($this->table, $this->id, 'created_at', 'timestamp', false); $this->updated_at = new object_property($this->table, $this->id, 'updated_at', 'timestamp', false); $this->deleted_at = new object_property($this->table, $this->id, 'deleted_at', 'timestamp', false); } public function objectChanged(): void { } public function asArray(): array { $this->requireSelected(); return [ 'id' => (int)$this->id, 'gateway_id' => (int)$this->gateway_id->value(), 'department_id' => (int)$this->department_id->value(), 'actor_user_id' => $this->actor_user_id->value() === null ? null : (int)$this->actor_user_id->value(), 'status' => (string)$this->status->value(), 'reason' => $this->reason->value() === null ? null : (string)$this->reason->value(), 'connection_id' => $this->connection_id->value() === null ? null : (string)$this->connection_id->value(), 'cwd' => $this->cwd->value() === null ? null : (string)$this->cwd->value(), 'shell_command' => $this->shell_command->value() === null ? null : (string)$this->shell_command->value(), 'shell_args' => (array)($this->shell_args_json->value() ?? []), 'cols' => $this->cols->value() === null ? null : (int)$this->cols->value(), 'rows' => $this->rows->value() === null ? null : (int)$this->rows->value(), 'transcript' => $this->transcript->value() === null ? null : (string)$this->transcript->value(), 'metadata' => (array)($this->metadata_json->value() ?? []), 'expires_at' => $this->expires_at->value() === null ? null : (string)$this->expires_at->value(), 'approved_at' => $this->approved_at->value() === null ? null : (string)$this->approved_at->value(), 'opened_at' => $this->opened_at->value() === null ? null : (string)$this->opened_at->value(), 'closed_at' => $this->closed_at->value() === null ? null : (string)$this->closed_at->value(), 'created_at' => (string)$this->created_at->value(), 'updated_at' => $this->updated_at->value() === null ? null : (string)$this->updated_at->value(), ]; } }