Files
nextcloud-ng_backup/lib/Db/Snapshot.php
T
dillard 193f65940b Pin a restore point and keep a note on it
Both live in the catalog on the location, so a new server sees them; the database holds
a local copy for the lists. The retention policy leaves a pinned restore point alone and
does not count it. Available on the restore page and as occ backup:pin and backup:note.
2026-11-06 23:49:50 +01:00

51 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
// SPDX-FileCopyrightText: 2026 Dillard Blom
// SPDX-License-Identifier: AGPL-3.0-or-later
namespace OCA\NgBackup\Db;
use OCP\AppFramework\Db\Entity;
/**
* @method int getTargetId()
* @method void setTargetId(int $v)
* @method string getSnapshotId()
* @method void setSnapshotId(string $v)
* @method string getKind()
* @method void setKind(string $v)
* @method string|null getLabel()
* @method void setLabel(?string $v)
* @method int getCreatedAt()
* @method void setCreatedAt(int $v)
* @method int|null getFiles()
* @method void setFiles(?int $v)
* @method int|null getBytes()
* @method void setBytes(?int $v)
* @method string|null getNote()
* @method void setNote(?string $v)
* @method bool|null getPinned()
* @method void setPinned(?bool $v)
*/
final class Snapshot extends Entity {
protected int $targetId = 0;
protected string $snapshotId = '';
protected string $kind = '';
protected ?string $label = null;
protected int $createdAt = 0;
protected ?int $files = null;
protected ?int $bytes = null;
protected ?string $note = null;
protected ?bool $pinned = null;
public function __construct() {
$this->addType('pinned', 'boolean');
$this->addType('targetId', 'integer');
$this->addType('createdAt', 'integer');
$this->addType('files', 'integer');
$this->addType('bytes', 'integer');
}
}