'integer', 'created_at' => 'timestamp', 'updated_at' => 'timestamp' ]; public function server(): BelongsTo { return $this->belongsTo(Server::class, 'server_id', 'id'); } public function getNodeKeyAttribute(): ?string { $serverType = strtolower((string) $this->server_type); $serverId = (int) $this->server_id; if ($serverType === '' || $serverId <= 0) { return null; } return $serverType . $serverId; } }