addType('pinned', 'boolean'); } public function setColor(string $color): void { $this->color = $color; } public function setIsPinned(bool $pinned): void { $this->isPinned = $pinned; } public function setSharedWith(array $sharedWith): void { $this->sharedWith = $sharedWith; } public function setSharedBy(array $sharedBy): void { $this->sharedBy = $sharedBy; } public function setTags(array $tags): void { $this->tags = $tags; } public function setAttachts(array $attachts): void { $this->attachts = $attachts; } public function jsonSerialize() { return [ 'id' => $this->id, 'title' => $this->title, 'content' => $this->content, 'isPinned' => $this->isPinned, 'timestamp' => $this->timestamp, 'color' => $this->color, 'sharedWith' => $this->sharedWith, 'sharedBy' => $this->sharedBy, 'tags' => $this->tags, 'attachments' => $this->attachts ]; } }