. * */ namespace OCA\News\Db; use \OCA\AppFramework\Db\Entity; class Folder extends Entity implements IAPI { public $parentId; public $name; public $userId; public $opened; public $deletedAt; public function __construct(){ $this->addType('parentId', 'int'); $this->addType('opened', 'bool'); $this->addType('deletedAt', 'int'); } public function toAPI() { return array( 'id' => $this->getId(), 'name' => $this->getName() ); } }