mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-12-01 07:37:18 +01:00
Upgrade to some new nextcloud standards
This commit is contained in:
39
lib/Db/Note.php
Normal file
39
lib/Db/Note.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
namespace OCA\QuickNotes\Db;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Note extends Entity implements JsonSerializable {
|
||||
|
||||
protected $title;
|
||||
protected $content;
|
||||
protected $timestamp;
|
||||
protected $colorId;
|
||||
protected $userId;
|
||||
protected $sharedWith;
|
||||
protected $isShared;
|
||||
protected $tags;
|
||||
|
||||
protected $color;
|
||||
|
||||
public function setColor($color) {
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'content' => $this->content,
|
||||
'timestamp' => $this->timestamp,
|
||||
'colorid' => $this->colorId,
|
||||
'color' => $this->color,
|
||||
'userid' => $this->userId,
|
||||
'sharedwith' => $this->sharedWith,
|
||||
'isshared' => $this->isShared,
|
||||
'tags' => $this->tags
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user