2021-09-18 17:28:10 +00:00
|
|
|
<?php
|
2023-10-11 19:55:03 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
// SPDX-FileCopyrightText: BVSC e.V. <no@example.com>
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-09-18 17:28:10 +00:00
|
|
|
|
|
|
|
namespace OCA\UPschooling\Db;
|
|
|
|
|
|
|
|
use JsonSerializable;
|
2023-10-11 19:55:03 +00:00
|
|
|
|
2021-09-18 17:28:10 +00:00
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
|
2023-10-11 19:55:03 +00:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
2021-09-18 17:28:10 +00:00
|
|
|
class MatrixTicket extends Entity implements JsonSerializable
|
|
|
|
{
|
2023-10-11 19:55:03 +00:00
|
|
|
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;
|
2021-09-18 17:28:10 +00:00
|
|
|
|
|
|
|
public function jsonSerialize(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
2022-04-23 10:58:01 +00:00
|
|
|
'matrixControlRoom' => $this->matrixControlRoom,
|
2021-09-18 17:28:10 +00:00
|
|
|
'matrixAssistedUser' => $this->matrixAssistedUser,
|
|
|
|
'matrixHelperUser' => $this->matrixHelperUser,
|
|
|
|
'status' => $this->status,
|
|
|
|
'version' => $this->version,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|