0
0
Fork 0
mirror of https://github.com/verdigado/organization_folders.git synced 2024-12-06 11:22:41 +01:00

Added friendly name to organization model

This commit is contained in:
Jonathan Treffler 2024-11-19 19:40:36 +01:00
parent f07b9953e3
commit e910ed5134

View file

@ -7,6 +7,7 @@ use OCA\OrganizationFolders\Interface\TableSerializable;
class Organization implements \JsonSerializable, TableSerializable {
public function __construct(
private int $id,
private string $friendlyName,
private string $membersGroup,
) {
}
@ -15,6 +16,10 @@ class Organization implements \JsonSerializable, TableSerializable {
return $this->id;
}
public function getFriendlyName(): string {
return $this->friendlyName;
}
public function getMembersGroup(): string {
return $this->membersGroup;
}
@ -22,6 +27,7 @@ class Organization implements \JsonSerializable, TableSerializable {
public function jsonSerialize(): array {
return [
'id' => $this->id,
'friendlyName' => $this->friendlyName,
'membersGroup' => $this->membersGroup,
];
}
@ -29,6 +35,7 @@ class Organization implements \JsonSerializable, TableSerializable {
public function tableSerialize(?array $params = null): array {
return [
'Id' => $this->id,
'Friendly Name' => $this->friendlyName,
'Members Group' => $this->membersGroup,
];
}