Skip to content

Commit 8c558d7

Browse files
authored
Update PointStruct.php - support uuid
1 parent e8e361e commit 8c558d7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Models/PointStruct.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class PointStruct
1616
use ProtectedPropertyAccessor;
1717

1818
// TODO: we need a solution for point with uuid
19-
protected int $id;
19+
protected int|string $id;
2020
protected ?array $payload = null;
2121
protected VectorStruct $vector;
2222

23-
public function __construct(int $id, VectorStruct $vector, array $payload = null)
23+
public function __construct(int|string $id, VectorStruct $vector, array $payload = null)
2424
{
2525
$this->id = $id;
2626
$this->vector = $vector;
@@ -58,7 +58,7 @@ public function toArray(): array
5858
/**
5959
* @return int
6060
*/
61-
public function getId(): int
61+
public function getId(): int|string
6262
{
6363
return $this->id;
6464
}
@@ -78,4 +78,4 @@ public function getVector(): VectorStruct
7878
{
7979
return $this->vector;
8080
}
81-
}
81+
}

0 commit comments

Comments
 (0)