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

View file

@ -4,6 +4,11 @@ namespace Netzbegruenung\Api\Model;
class Group class Group
{ {
/**
* @var Organization|null
*/
protected $organization;
/** /**
* @var string|null * @var string|null
*/ */
@ -34,6 +39,22 @@ class Group
*/ */
protected $externalRefs = []; 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 * @return string|null
*/ */

View file

@ -4,6 +4,11 @@ namespace Netzbegruenung\Api\Model;
class GroupFilter class GroupFilter
{ {
/**
* @var string|null
*/
protected $organizationId;
/** /**
* @var string|null * @var string|null
*/ */
@ -34,6 +39,22 @@ class GroupFilter
*/ */
protected $level; 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 * @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; protected $type;
/** /**
* @var string * @var Organization
*/ */
protected $organization; protected $organization;
@ -73,17 +73,17 @@ class RegionalChapter
} }
/** /**
* @return string * @return Organization
*/ */
public function getOrganization(): string public function getOrganization(): ?Organization
{ {
return $this->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; $this->organization = $organization;
} }

View file

@ -14,6 +14,69 @@ class RegionalChapterFilter
*/ */
protected $offset; 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 * @return int|null
*/ */
@ -45,4 +108,4 @@ class RegionalChapterFilter
{ {
$this->offset = $offset; $this->offset = $offset;
} }
} }