Inital backend support to pinned notes

This commit is contained in:
Matias De lellis
2020-06-04 13:39:58 -03:00
parent 0845127458
commit c70c87a20d
10 changed files with 126 additions and 124 deletions

View File

@@ -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,