2024-10-13 18:06:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCA\OrganizationFolders\Model;
|
|
|
|
|
2024-11-03 02:19:17 +01:00
|
|
|
use OCA\OrganizationFolders\Interface\TableSerializable;
|
|
|
|
|
|
|
|
class Organization implements \JsonSerializable, TableSerializable {
|
2024-10-13 18:06:53 +02:00
|
|
|
public function __construct(
|
|
|
|
private int $id,
|
2024-11-19 19:40:36 +01:00
|
|
|
private string $friendlyName,
|
2024-10-13 18:06:53 +02:00
|
|
|
private string $membersGroup,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getId(): int {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
2024-11-19 19:40:36 +01:00
|
|
|
public function getFriendlyName(): string {
|
|
|
|
return $this->friendlyName;
|
|
|
|
}
|
|
|
|
|
2024-10-13 18:06:53 +02:00
|
|
|
public function getMembersGroup(): string {
|
|
|
|
return $this->membersGroup;
|
|
|
|
}
|
2024-10-13 22:55:24 +02:00
|
|
|
|
|
|
|
public function jsonSerialize(): array {
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
2024-11-19 19:40:36 +01:00
|
|
|
'friendlyName' => $this->friendlyName,
|
2024-10-13 22:55:24 +02:00
|
|
|
'membersGroup' => $this->membersGroup,
|
|
|
|
];
|
|
|
|
}
|
2024-11-03 02:19:17 +01:00
|
|
|
|
|
|
|
public function tableSerialize(?array $params = null): array {
|
|
|
|
return [
|
|
|
|
'Id' => $this->id,
|
2024-11-19 19:40:36 +01:00
|
|
|
'Friendly Name' => $this->friendlyName,
|
2024-11-03 02:19:17 +01:00
|
|
|
'Members Group' => $this->membersGroup,
|
|
|
|
];
|
|
|
|
}
|
2024-10-13 18:06:53 +02:00
|
|
|
}
|