0
0
Fork 0
mirror of https://github.com/verdigado/organization_folders.git synced 2024-11-24 05:30:27 +01:00
organization_folders/lib/Model/OrganizationRole.php

49 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
namespace OCA\OrganizationFolders\Model;
use OCA\OrganizationFolders\Interface\TableSerializable;
class OrganizationRole implements \JsonSerializable, TableSerializable {
public function __construct(
private string $id,
private int $organizationId,
private string $friendlyName,
private string $membersGroup,
) {
}
public function getId(): string {
return $this->id;
}
public function getOrganizationId(): int {
return $this->organizationId;
}
public function getFriendlyName(): string {
return $this->friendlyName;
}
public function getMembersGroup(): string {
return $this->membersGroup;
}
public function jsonSerialize(): array {
return [
'id' => $this->id,
'organizationId' => $this->organizationId,
'friendlyName' => $this->friendlyName,
'membersGroup' => $this->membersGroup,
];
}
public function tableSerialize(?array $params = null): array {
return [
'Id' => $this->id,
'Name' => $this->friendlyName,
'Organization Id' => $this->organizationId,
'Members Group' => $this->membersGroup,
];
}
}