2020-04-26 11:36:41 +02:00
|
|
|
<?php
|
|
|
|
namespace OCA\BigBlueButton\Db;
|
|
|
|
|
|
|
|
use JsonSerializable;
|
|
|
|
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
|
|
|
|
class Room extends Entity implements JsonSerializable
|
|
|
|
{
|
2020-06-04 18:56:55 +02:00
|
|
|
const ACCESS_PUBLIC = 'public';
|
|
|
|
const ACCESS_PASSWORD = 'password';
|
|
|
|
const ACCESS_WAITING_ROOM = 'waiting_room';
|
|
|
|
const ACCESS_INTERNAL = 'internal';
|
|
|
|
const ACCESS_INTERNAL_RESTRICTED = 'internal_restricted';
|
|
|
|
|
2020-04-26 11:36:41 +02:00
|
|
|
public $uid;
|
|
|
|
public $name;
|
|
|
|
public $attendeePassword;
|
|
|
|
public $moderatorPassword;
|
|
|
|
public $welcome;
|
|
|
|
public $maxParticipants;
|
|
|
|
public $record;
|
|
|
|
public $userId;
|
2020-06-04 18:56:55 +02:00
|
|
|
public $access;
|
|
|
|
public $password;
|
2020-06-17 08:19:54 +02:00
|
|
|
public $everyoneIsModerator;
|
2020-04-26 11:36:41 +02:00
|
|
|
|
2020-04-27 17:16:18 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->addType('maxParticipants', 'integer');
|
|
|
|
$this->addType('record', 'boolean');
|
2020-06-17 08:19:54 +02:00
|
|
|
$this->addType('everyoneIsModerator', 'boolean');
|
2020-04-27 17:16:18 +02:00
|
|
|
}
|
|
|
|
|
2020-04-26 11:36:41 +02:00
|
|
|
public function jsonSerialize(): array
|
|
|
|
{
|
|
|
|
return [
|
2020-06-17 08:19:54 +02:00
|
|
|
'id' => $this->id,
|
|
|
|
'uid' => $this->uid,
|
2020-06-17 10:56:28 +02:00
|
|
|
'userId' => $this->userId,
|
2020-06-17 08:19:54 +02:00
|
|
|
'name' => $this->name,
|
|
|
|
'welcome' => $this->welcome,
|
|
|
|
'maxParticipants' => (int) $this->maxParticipants,
|
|
|
|
'record' => boolval($this->record),
|
|
|
|
'access' => $this->access,
|
|
|
|
'password' => $this->password,
|
|
|
|
'everyoneIsModerator' => boolval($this->everyoneIsModerator),
|
2020-04-26 11:36:41 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|