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,
|
2024-11-01 02:52:42 +01:00
|
|
|
private ?string $organizationProvider = null,
|
|
|
|
private ?int $organizationId = null,
|
2024-10-30 04:47:47 +01:00
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getId(): int {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getName(): string {
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getQuota(): int {
|
|
|
|
return $this->quota;
|
|
|
|
}
|
|
|
|
|
2024-11-03 17:24:30 +01:00
|
|
|
public function getOrganizationProvider(): ?string {
|
2024-11-02 20:17:40 +01:00
|
|
|
return $this->organizationProvider;
|
|
|
|
}
|
|
|
|
|
2024-11-03 17:24:30 +01:00
|
|
|
public function getOrganizationId(): ?int {
|
2024-11-02 20:17:40 +01:00
|
|
|
return $this->organizationId;
|
|
|
|
}
|
|
|
|
|
2024-10-30 04:47:47 +01:00
|
|
|
public function jsonSerialize(): array {
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
|
|
|
'name' => $this->name,
|
|
|
|
'quota' => $this->quota,
|
2024-11-01 02:52:42 +01:00
|
|
|
'organizationProvider' => $this->organizationProvider,
|
|
|
|
'organizationId' => $this->organizationId,
|
2024-10-30 04:47:47 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
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,
|
2024-11-01 02:52:42 +01:00
|
|
|
'Organization Provider' => $this->organizationProvider,
|
|
|
|
'Organization Id' => $this->organizationId,
|
2024-10-30 04:47:47 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|