mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Inital backend support to pinned notes
This commit is contained in:
@@ -9,6 +9,7 @@ class Note extends Entity implements JsonSerializable {
|
||||
|
||||
protected $title;
|
||||
protected $content;
|
||||
protected $pinned;
|
||||
protected $timestamp;
|
||||
protected $colorId;
|
||||
protected $userId;
|
||||
@@ -17,16 +18,23 @@ class Note extends Entity implements JsonSerializable {
|
||||
protected $tags;
|
||||
|
||||
protected $color;
|
||||
protected $isPinned;
|
||||
|
||||
public function setColor($color) {
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
public function setIsPinned($pinned) {
|
||||
$this->isPinned = $pinned;
|
||||
}
|
||||
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'content' => $this->content,
|
||||
'pinned' => $this->pinned,
|
||||
'ispinned' => $this->isPinned,
|
||||
'timestamp' => $this->timestamp,
|
||||
'colorid' => $this->colorId,
|
||||
'color' => $this->color,
|
||||
|
||||
Reference in New Issue
Block a user