Compare commits

...

8 commits

Author SHA1 Message Date
Maximilian Ruta c19af4c4d4
Add more infos to models 2021-06-12 13:49:21 +02:00
Maximilian Ruta 1f0a2b97b1 Merge branch 'master' of github.com:netzbegruenung/api-models-php 2020-03-21 23:30:17 +01:00
Maximilian Ruta 318b7658f1 add organization 2020-03-21 23:30:02 +01:00
Maximilian Ruta a318e4fa6c Add more filters 2020-02-16 17:34:21 +01:00
Maximilian Ruta f316910006 Merge branch 'master' of github.com:netzbegruenung/api-models-php 2020-02-16 16:59:08 +01:00
Maximilian Ruta 1de15e3d18 Add groups 2020-02-16 16:58:18 +01:00
Maximilian Ruta d07f6aee2c add organization 2020-02-01 22:11:51 +01:00
Maximilian Ruta 0f2b44b4e1 add organization 2020-02-01 22:06:43 +01:00
10 changed files with 299 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

@ -6,3 +6,7 @@ Netzbegruenung\Api\Model\RegionalChapter:
type: string
type:
type: string
zipCode:
type: string
organization:
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

@ -15,10 +15,20 @@ class RegionalChapter
protected $name;
/**
* @var string
* @var string|null
*/
protected $type;
/**
* @var Organization
*/
protected $organization;
/**
* @var string|null
*/
protected $zipCode;
/**
* @return string
*/
@ -52,18 +62,50 @@ class RegionalChapter
}
/**
* @return string
* @return string|null
*/
public function getType(): string
public function getType(): ?string
{
return $this->type;
}
/**
* @param string $type
* @param string|null $type
*/
public function setType(string $type): void
public function setType(?string $type): void
{
$this->type = $type;
}
}
/**
* @return Organization
*/
public function getOrganization(): ?Organization
{
return $this->organization;
}
/**
* @param Organization $organization
*/
public function setOrganization(?Organization $organization): void
{
$this->organization = $organization;
}
/**
* @return string|null
*/
public function getZipCode() : ?string
{
return $this->zipCode;
}
/**
* @param string|null $zipCode
*/
public function setZipCode(?string $zipCode): void
{
$this->zipCode = $zipCode;
}
}

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;
}
}
}