Files
nextcloud-mail/lib/Db/TextBlock.php
Hamza fcbfc63cca feat: text blocks
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
2025-07-28 17:37:24 +02:00

50 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Mail\Db;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
use ReturnTypeWillChange;
/**
* @method string getOwner()
* @method void setOwner(string $owner)
* @method string getTitle()
* @method void setTitle(string $title)
* @method string getContent()
* @method void setContent(string $content)
* @method string getPreview()
* @method void setPreview(string $preview)
*/
class TextBlock extends Entity implements JsonSerializable {
protected $owner;
protected $title;
protected $content;
protected $preview;
public function __construct() {
$this->addType('owner', 'string');
$this->addType('title', 'string');
$this->addType('content', 'string');
$this->addType('preview', 'string');
}
#[ReturnTypeWillChange]
public function jsonSerialize() {
return [
'id' => $this->getId(),
'owner' => $this->getOwner(),
'title' => $this->getTitle(),
'content' => $this->getContent(),
'preview' => $this->getPreview(),
];
}
}