67 lines
2.0 KiB
PHP
67 lines
2.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace OCA\NuqloudScrum\Db;
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
use OCP\DB\Types;
|
|
|
|
/**
|
|
* @method int getThreadId()
|
|
* @method void setThreadId(int $threadId)
|
|
* @method int getTalkMessageId()
|
|
* @method void setTalkMessageId(int $talkMessageId)
|
|
* @method string getActorType()
|
|
* @method void setActorType(string $actorType)
|
|
* @method string getActorId()
|
|
* @method void setActorId(string $actorId)
|
|
* @method ?string getActorDisplayName()
|
|
* @method void setActorDisplayName(?string $actorDisplayName)
|
|
* @method ?string getMessageText()
|
|
* @method void setMessageText(?string $messageText)
|
|
* @method string getMessageHash()
|
|
* @method void setMessageHash(string $messageHash)
|
|
* @method ?string getRawPayload()
|
|
* @method void setRawPayload(?string $rawPayload)
|
|
* @method int getCreatedAt()
|
|
* @method void setCreatedAt(int $createdAt)
|
|
* @method int getUpdatedAt()
|
|
* @method void setUpdatedAt(int $updatedAt)
|
|
*/
|
|
class ThreadMessage extends Entity implements \JsonSerializable {
|
|
protected $threadId = 0;
|
|
protected $talkMessageId = 0;
|
|
protected $actorType = '';
|
|
protected $actorId = '';
|
|
protected $actorDisplayName = null;
|
|
protected $messageText = null;
|
|
protected $messageHash = '';
|
|
protected $rawPayload = null;
|
|
protected $createdAt = 0;
|
|
protected $updatedAt = 0;
|
|
|
|
public function __construct() {
|
|
$this->addType('threadId', Types::INTEGER);
|
|
$this->addType('talkMessageId', Types::INTEGER);
|
|
$this->addType('createdAt', Types::INTEGER);
|
|
$this->addType('updatedAt', Types::INTEGER);
|
|
}
|
|
|
|
#[\ReturnTypeWillChange]
|
|
public function jsonSerialize() {
|
|
return [
|
|
'id' => $this->getId(),
|
|
'threadId' => $this->getThreadId(),
|
|
'talkMessageId' => $this->getTalkMessageId(),
|
|
'actorType' => $this->getActorType(),
|
|
'actorId' => $this->getActorId(),
|
|
'actorDisplayName' => $this->getActorDisplayName(),
|
|
'messageText' => $this->getMessageText(),
|
|
'messageHash' => $this->getMessageHash(),
|
|
'createdAt' => $this->getCreatedAt(),
|
|
'updatedAt' => $this->getUpdatedAt(),
|
|
];
|
|
}
|
|
}
|