NC app base
This commit is contained in:
33
lib/Db/Note.php
Normal file
33
lib/Db/Note.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
// SPDX-FileCopyrightText: Szabó Dávid <daevidt@gmail.com>
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
namespace OCA\Nezd\Db;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
/**
|
||||
* @method getId(): int
|
||||
* @method getTitle(): string
|
||||
* @method setTitle(string $title): void
|
||||
* @method getContent(): string
|
||||
* @method setContent(string $content): void
|
||||
* @method getUserId(): string
|
||||
* @method setUserId(string $userId): void
|
||||
*/
|
||||
class Note extends Entity implements JsonSerializable {
|
||||
protected string $title = '';
|
||||
protected string $content = '';
|
||||
protected string $userId = '';
|
||||
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'title' => $this->title,
|
||||
'content' => $this->content
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user