2024-10-30 04:47:47 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCA\OrganizationFolders\Model;
|
|
|
|
|
|
|
|
use \JsonSerializable;
|
|
|
|
use OCA\OrganizationFolders\Interface\TableSerializable;
|
|
|
|
|
|
|
|
class OrganizationFolder implements JsonSerializable, TableSerializable {
|
|
|
|
public function __construct(
|
|
|
|
private int $id,
|
|
|
|
private string $name,
|
|
|
|
private int $quota,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getId(): int {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getName(): string {
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getQuota(): int {
|
|
|
|
return $this->quota;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function jsonSerialize(): array {
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
|
|
|
'name' => $this->name,
|
|
|
|
'quota' => $this->quota,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2024-10-31 17:29:15 +01:00
|
|
|
public function tableSerialize(?array $params = null): array {
|
2024-10-30 04:47:47 +01:00
|
|
|
return [
|
|
|
|
'Id' => $this->id,
|
|
|
|
'Name' => $this->name,
|
|
|
|
'Quota' => $this->quota,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|