[ENTITY] Add JsonSerializable interface to Entity base class and implement it for the Note class

This commit is contained in:
2021-08-08 00:39:39 +00:00
parent 2851b899b8
commit 6728dd40b0
2 changed files with 25 additions and 1 deletions

View File

@@ -262,6 +262,14 @@ class Note extends Entity
[], ['id' => $this->id]));
}
public function jsonSerialize()
{
return [
'content' => $this->getContent(),
'author' => $this->getGSActorId(),
];
}
public static function schemaDef(): array
{
return [