add organization

This commit is contained in:
Maximilian Ruta 2020-03-21 23:30:02 +01:00
parent d07f6aee2c
commit 318b7658f1
10 changed files with 253 additions and 8 deletions

View File

@ -1,5 +1,7 @@
Netzbegruenung\Api\Model\Group:
properties:
organization:
type: Netzbegruenung\Api\Model\Organization
name:
type: string
type:
@ -12,4 +14,3 @@ Netzbegruenung\Api\Model\Group:
type: string
externalRefs:
type: array<Netzbegruenung\Api\Model\ExternalRef>

View File

@ -0,0 +1,8 @@
Netzbegruenung\Api\Model\Organization:
properties:
id:
type: string
name:
type: string
regionalChapterIdPrefix:
type: string

View File

@ -0,0 +1,6 @@
Netzbegruenung\Api\Model\OrganizationList:
properties:
count:
type: integer
items:
type: array<Netzbegruenung\Api\Model\Organization>

View File

@ -7,4 +7,4 @@ Netzbegruenung\Api\Model\RegionalChapter:
type:
type: string
organization:
type: string
type: Netzbegruenung\Api\Model\Organization

View File

@ -4,6 +4,11 @@ namespace Netzbegruenung\Api\Model;
class Group
{
/**
* @var Organization|null
*/
protected $organization;
/**
* @var string|null
*/
@ -34,6 +39,22 @@ class Group
*/
protected $externalRefs = [];
/**
* @return Organization|null
*/
public function getOrganization(): ?Organization
{
return $this->organization;
}
/**
* @param Organization|null $organization
*/
public function setOrganization(?Organization $organization): void
{
$this->organization = $organization;
}
/**
* @return string|null
*/

View File

@ -4,6 +4,11 @@ namespace Netzbegruenung\Api\Model;
class GroupFilter
{
/**
* @var string|null
*/
protected $organizationId;
/**
* @var string|null
*/
@ -34,6 +39,22 @@ class GroupFilter
*/
protected $level;
/**
* @return string|null
*/
public function getOrganizationId(): ?string
{
return $this->organizationId;
}
/**
* @param string|null $organizationId
*/
public function setOrganizationId(?string $organizationId): void
{
$this->organizationId = $organizationId;
}
/**
* @return string|null
*/

69
src/Organization.php Normal file
View File

@ -0,0 +1,69 @@
<?php
namespace Netzbegruenung\Api\Model;
class Organization
{
/**
* @var string
*/
protected $id;
/**
* @var string
*/
protected $name;
/**
* @var string
*/
protected $regionalChapterIdPrefix;
/**
* @return string
*/
public function getRegionalChapterIdPrefix(): string
{
return $this->regionalChapterIdPrefix;
}
/**
* @param string $regionalChapterIdPrefix
*/
public function setRegionalChapterIdPrefix(string $regionalChapterIdPrefix): void
{
$this->regionalChapterIdPrefix = $regionalChapterIdPrefix;
}
/**
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* @param string $id
*/
public function setId(string $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): void
{
$this->name = $name;
}
}

56
src/OrganizationList.php Normal file
View File

@ -0,0 +1,56 @@
<?php
namespace Netzbegruenung\Api\Model;
class OrganizationList
{
/**
* @var int|null
*/
protected $count;
/**
* @var Organization[]
*/
protected $items = [];
/**
* @return int|null
*/
public function getCount(): ?int
{
return $this->count;
}
/**
* @param int|null $count
*/
public function setCount(?int $count): void
{
$this->count = $count;
}
/**
* @return Organization[]
*/
public function getItems(): array
{
return $this->items;
}
/**
* @param Organization[] $items
*/
public function setItems(array $items): void
{
$this->items = $items;
}
/**
* @param Organization $item
*/
public function addItem(Organization $item): void
{
$this->items[] = $item;
}
}

View File

@ -20,7 +20,7 @@ class RegionalChapter
protected $type;
/**
* @var string
* @var Organization
*/
protected $organization;
@ -73,17 +73,17 @@ class RegionalChapter
}
/**
* @return string
* @return Organization
*/
public function getOrganization(): string
public function getOrganization(): ?Organization
{
return $this->organization;
}
/**
* @param string $organization
* @param Organization $organization
*/
public function setOrganization(string $organization): void
public function setOrganization(?Organization $organization): void
{
$this->organization = $organization;
}

View File

@ -14,6 +14,69 @@ class RegionalChapterFilter
*/
protected $offset;
/**
* @var string|null
*/
protected $query;
/**
* @var string|null
*/
protected $idPrefix;
/**
* @var string|null
*/
protected $type;
/**
* @return string|null
*/
public function getType(): ?string
{
return $this->type;
}
/**
* @param string|null $type
*/
public function setType(?string $type): void
{
$this->type = $type;
}
/**
* @return string|null
*/
public function getIdPrefix(): ?string
{
return $this->idPrefix;
}
/**
* @param string|null $idPrefix
*/
public function setIdPrefix(?string $idPrefix): void
{
$this->idPrefix = $idPrefix;
}
/**
* @return string|null
*/
public function getQuery(): ?string
{
return $this->query;
}
/**
* @param string|null $query
*/
public function setQuery(?string $query): void
{
$this->query = $query;
}
/**
* @return int|null
*/
@ -45,4 +108,4 @@ class RegionalChapterFilter
{
$this->offset = $offset;
}
}
}