value = is_null($value) ? Uuid::uuid7() : Uuid::fromString($value); } /** @return UuidInterface */ public function getValue(): UuidInterface { return $this->value; } /** @inheritDoc */ public function jsonSerialize(): string { return $this->value->toString(); } public function equals(Id $id): bool { return $this->value->toString() === $id->getValue()->toString(); } }