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
|
|
|
|
{
|
|
|
|
public $uid;
|
|
|
|
public $name;
|
|
|
|
public $attendeePassword;
|
|
|
|
public $moderatorPassword;
|
|
|
|
public $welcome;
|
|
|
|
public $maxParticipants;
|
|
|
|
public $record;
|
|
|
|
public $userId;
|
|
|
|
|
2020-04-27 17:16:18 +02:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
$this->addType('maxParticipants', 'integer');
|
|
|
|
$this->addType('record', 'boolean');
|
|
|
|
}
|
|
|
|
|
2020-04-26 11:36:41 +02:00
|
|
|
public function jsonSerialize(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
|
|
|
'uid' => $this->uid,
|
|
|
|
'name' => $this->name,
|
|
|
|
'welcome' => $this->welcome,
|
|
|
|
'maxParticipants' => (int) $this->maxParticipants,
|
|
|
|
'record' => boolval($this->record),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|