/
kev
/
Nextcloud_File-Changes-Tracker
Обзор
Документация
Войти
/
kev
/
Nextcloud_File-Changes-Tracker
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
lib/Db/EventLog.php
72 строки
2 KB
Evgeny Konovalov
first_commit
16 фев 2026, 17:45
16 фев 2026, 17:45
476f06c
Код
Авторство
О чём код?
<?php declare(strict_types=1); namespace OCA\FileChangesTracker\Db; use JsonSerializable; use OCP\AppFramework\Db\Entity; /** * Сущность для записи в журнале событий * * @method int getFolderConfigId() * @method void setFolderConfigId(int $folderConfigId) * @method string getEventType() * @method void setEventType(string $eventType) * @method string getFilePath() * @method void setFilePath(string $filePath) * @method int|null getFileId() * @method void setFileId(?int $fileId) * @method string|null getOldFilePath() * @method void setOldFilePath(?string $oldFilePath) * @method string getUserId() * @method void setUserId(string $userId) * @method string getUserDisplayName() * @method void setUserDisplayName(string $userDisplayName) * @method string getEventTimestamp() * @method void setEventTimestamp(string $eventTimestamp) * @method int|null getFileSize() * @method void setFileSize(?int $fileSize) * @method string|null getMimeType() * @method void setMimeType(?string $mimeType) * @method bool getNotificationSent() * @method void setNotificationSent(bool $notificationSent) */ class EventLog extends Entity implements JsonSerializable { protected $folderConfigId; protected $eventType = ''; protected $filePath = ''; protected $fileId; protected $oldFilePath; protected $userId = ''; protected $userDisplayName = ''; protected $eventTimestamp = ''; protected $fileSize; protected $mimeType; protected $notificationSent = false; public function __construct() { $this->addType('folderConfigId', 'integer'); $this->addType('fileId', 'integer'); $this->addType('fileSize', 'integer'); $this->addType('notificationSent', 'boolean'); } public function jsonSerialize(): array { return [ 'id' => $this->id, 'folderConfigId' => $this->folderConfigId, 'eventType' => $this->eventType, 'filePath' => $this->filePath, 'fileId' => $this->fileId, 'oldFilePath' => $this->oldFilePath, 'userId' => $this->userId, 'userDisplayName' => $this->userDisplayName, 'eventTimestamp' => $this->eventTimestamp, 'fileSize' => $this->fileSize, 'mimeType' => $this->mimeType, 'notificationSent' => $this->notificationSent, ]; } }