Files

71 lines
2.1 KiB
PHP

<?php
declare(strict_types=1);
namespace OCA\NuqloudScrum\Db;
use OCP\AppFramework\Db\Entity;
use OCP\DB\Types;
/**
* @method int getWorkspaceId()
* @method void setWorkspaceId(int $workspaceId)
* @method ?int getThreadId()
* @method void setThreadId(?int $threadId)
* @method ?int getDeckBoardId()
* @method void setDeckBoardId(?int $deckBoardId)
* @method ?int getDeckStackId()
* @method void setDeckStackId(?int $deckStackId)
* @method ?int getDeckCardId()
* @method void setDeckCardId(?int $deckCardId)
* @method ?int getLastSyncAt()
* @method void setLastSyncAt(?int $lastSyncAt)
* @method string getSyncState()
* @method void setSyncState(string $syncState)
* @method ?string getSyncError()
* @method void setSyncError(?string $syncError)
* @method int getCreatedAt()
* @method void setCreatedAt(int $createdAt)
* @method int getUpdatedAt()
* @method void setUpdatedAt(int $updatedAt)
*/
class DeckSync extends Entity implements \JsonSerializable {
protected $workspaceId = 0;
protected $threadId = null;
protected $deckBoardId = null;
protected $deckStackId = null;
protected $deckCardId = null;
protected $lastSyncAt = null;
protected $syncState = 'pending';
protected $syncError = null;
protected $createdAt = 0;
protected $updatedAt = 0;
public function __construct() {
$this->addType('workspaceId', Types::INTEGER);
$this->addType('threadId', Types::INTEGER);
$this->addType('deckBoardId', Types::INTEGER);
$this->addType('deckStackId', Types::INTEGER);
$this->addType('deckCardId', Types::INTEGER);
$this->addType('lastSyncAt', Types::INTEGER);
$this->addType('createdAt', Types::INTEGER);
$this->addType('updatedAt', Types::INTEGER);
}
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return [
'id' => $this->getId(),
'workspaceId' => $this->getWorkspaceId(),
'threadId' => $this->getThreadId(),
'deckBoardId' => $this->getDeckBoardId(),
'deckStackId' => $this->getDeckStackId(),
'deckCardId' => $this->getDeckCardId(),
'lastSyncAt' => $this->getLastSyncAt(),
'syncState' => $this->getSyncState(),
'createdAt' => $this->getCreatedAt(),
'updatedAt' => $this->getUpdatedAt(),
];
}
}