setTable('edge_gateway_command_jobs'); } public function getObjectProperties(): void { $this->gateway_id = new object_property($this->table, $this->id, 'gateway_id', 'int', false); $this->command_type = new object_property($this->table, $this->id, 'command_type', 'string', false); $this->status = new object_property($this->table, $this->id, 'status', 'string', false); $this->request_json = new object_property($this->table, $this->id, 'request_json', 'json', false); $this->response_json = new object_property($this->table, $this->id, 'response_json', 'json', false); $this->delivery_json = new object_property($this->table, $this->id, 'delivery_json', 'json', false); $this->correlation_id = new object_property($this->table, $this->id, 'correlation_id', 'string', false); $this->requested_by = new object_property($this->table, $this->id, 'requested_by', 'int', false); $this->requested_at = new object_property($this->table, $this->id, 'requested_at', 'string', false); $this->completed_at = new object_property($this->table, $this->id, 'completed_at', 'string', false); $this->error_message = new object_property($this->table, $this->id, 'error_message', 'text', 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(), 'command_type' => (string)$this->command_type->value(), 'status' => (string)$this->status->value(), 'request' => (array)($this->request_json->value() ?? []), 'response' => (array)($this->response_json->value() ?? []), 'delivery' => (array)($this->delivery_json->value() ?? []), 'correlation_id' => (string)$this->correlation_id->value(), 'requested_by' => $this->requested_by->value() === null ? null : (int)$this->requested_by->value(), 'requested_at' => (string)$this->requested_at->value(), 'completed_at' => $this->completed_at->value() === null ? null : (string)$this->completed_at->value(), 'error_message' => $this->error_message->value() === null ? null : (string)$this->error_message->value(), 'created_at' => (string)$this->created_at->value(), 'updated_at' => $this->updated_at->value() === null ? null : (string)$this->updated_at->value(), ]; } }