22 lines
357 B
PHP
22 lines
357 B
PHP
|
<?php
|
||
|
|
||
|
namespace OCA\NotesTutorial\Db;
|
||
|
|
||
|
use JsonSerializable;
|
||
|
|
||
|
use OCP\AppFramework\Db\Entity;
|
||
|
|
||
|
class Note extends Entity implements JsonSerializable {
|
||
|
protected $title;
|
||
|
protected $content;
|
||
|
protected $userId;
|
||
|
|
||
|
public function jsonSerialize(): array {
|
||
|
return [
|
||
|
'id' => $this->id,
|
||
|
'title' => $this->title,
|
||
|
'content' => $this->content
|
||
|
];
|
||
|
}
|
||
|
}
|