Nextcloud-App/lib/Db/MatrixTicket.php

45 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
// SPDX-FileCopyrightText: BVSC e.V. <no@example.com>
// SPDX-License-Identifier: AGPL-3.0-or-later
namespace OCA\UPschooling\Db;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
/**
* @method getId(): int
* @method getMatrixControlRoom(): string
* @method setMatrixControlRoom(string $roomId): void
* @method getMatrixAssistedUser(): string
* @method setMatrixAssistedUser(string $userId): void
* @method getMatrixHelperUser(): ?string
* @method setMatrixHelperUser(?string $userId): void
* @method getStatus(): string
* @method setStatus(string $status): void
* @method getVersion(): int
* @method setVersion(int $version): void
*/
class MatrixTicket extends Entity implements JsonSerializable
{
protected string $matrixControlRoom = '';
protected string $matrixAssistedUser = ''; // The ID of the person who created the ticket. Usually the person who needs help.
protected ?string $matrixHelperUser = null;
protected string $status = '';
protected int $version = 0;
public function jsonSerialize(): array
{
return [
'id' => $this->id,
'matrixControlRoom' => $this->matrixControlRoom,
'matrixAssistedUser' => $this->matrixAssistedUser,
'matrixHelperUser' => $this->matrixHelperUser,
'status' => $this->status,
'version' => $this->version,
];
}
}