Files
nextcloud-recognize/lib/Db/QueueFile.php
Marcel Klehr a73dc9aa79 Small fixes
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2022-08-05 13:29:32 +02:00

47 lines
1.1 KiB
PHP

<?php
namespace OCA\Recognize\Db;
use OCP\AppFramework\Db\Entity;
/**
* Class QueueFile
*
* @package OCA\Recognize\Db
* @method string getFileId()
* @method setFileId(int $fileId)
* @method string getStorageId()
* @method setStorageId(string $storageId)
* @method string getRootId()
* @method setRootId(string $rootId)
* @method setUpdate(boolean $update)
* @method bool getUpdate()
*/
class QueueFile extends Entity {
public $id;
protected $fileId;
protected $storageId;
protected $rootId;
protected $update;
public static array $columns = ['id', 'file_id', 'storage_id', 'root_id', 'update'];
public static array $fields = ['id', 'fileId', 'storageId', 'rootId', 'update'];
public function __construct() {
// add types in constructor
$this->addType('id', 'integer');
$this->addType('fileId', 'integer');
$this->addType('storageId', 'integer');
$this->addType('rootId', 'integer');
$this->addType('update', 'boolean');
}
public function toArray(): array {
$array = [];
foreach (self::$fields as $field) {
$array[$field] = $this->{$field};
}
return $array;
}
}