Files
nextcloud-recognize/lib/Db/QueueFile.php
Marcel Klehr 6f8e746f5b fix(codestyle): Run cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2024-12-08 18:03:00 +01:00

54 lines
1.3 KiB
PHP

<?php
/*
* Copyright (c) 2022 The Recognize contributors.
* This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
*/
declare(strict_types=1);
namespace OCA\Recognize\Db;
use OCP\AppFramework\Db\Entity;
/**
* Class QueueFile
*
* @package OCA\Recognize\Db
* @method int getFileId()
* @method setFileId(int $fileId)
* @method int getStorageId()
* @method setStorageId(int $storageId)
* @method int getRootId()
* @method setRootId(int $rootId)
* @method setUpdate(boolean $update)
* @method bool getUpdate()
*/
class QueueFile extends Entity {
public $id;
protected $fileId;
protected $storageId;
protected $rootId;
protected $update;
/** @var string[] */
public static array $columns = ['id', 'file_id', 'storage_id', 'root_id', 'update'];
/** @var string[] */
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;
}
}