mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-12-06 11:22:41 +01:00
added work-in-progress organization folder occ commands
This commit is contained in:
parent
840fd70c37
commit
851fa0a1cc
5 changed files with 175 additions and 0 deletions
43
lib/Model/OrganizationFolder.php
Normal file
43
lib/Model/OrganizationFolder.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?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,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getId(): int {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getQuota(): int {
|
||||
return $this->quota;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'quota' => $this->quota,
|
||||
];
|
||||
}
|
||||
|
||||
public function tableSerialize(): array {
|
||||
return [
|
||||
'Id' => $this->id,
|
||||
'Name' => $this->name,
|
||||
'Quota' => $this->quota,
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue