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,
|
|
|
|
private string $membersGroup,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getId(): int {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getMembersGroup(): string {
|
|
|
|
return $this->membersGroup;
|
|
|
|
}
|
2024-10-13 22:55:24 +02:00
|
|
|
|
|
|
|
public function jsonSerialize(): array {
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
|
|
|
'membersGroup' => $this->membersGroup,
|
|
|
|
];
|
|
|
|
}
|
2024-11-03 02:19:17 +01:00
|
|
|
|
|
|
|
public function tableSerialize(?array $params = null): array {
|
|
|
|
return [
|
|
|
|
'Id' => $this->id,
|
|
|
|
'Members Group' => $this->membersGroup,
|
|
|
|
];
|
|
|
|
}
|
2024-10-13 18:06:53 +02:00
|
|
|
}
|