smarcet bd94b62c12 Added Membership endpoints for my member
sign foundation

scopes

REAL_URL/members/write/me

PUT /api/v1/members/me/membership/foundation

resign foundation membetship

PUT /api/v1/members/me/membership/community

scopes

REAL_URL/members/write/me

Change-Id: Ib636cf5149cb8b0f633243726c58d3e9329c7234
Signed-off-by: smarcet <smarcet@gmail.com>
2021-01-12 18:41:26 -03:00

165 lines
3.3 KiB
PHP

<?php namespace App\Models\ResourceServer;
/**
* Copyright 2015 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
use Doctrine\ORM\Mapping AS ORM;
/**
* @ORM\Entity
* @ORM\Table(name="api_scopes")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="resource_server_region")
* Class ApiScope
* @package App\Models\ResourceServer
*/
class ApiScope extends ResourceServerEntity implements IApiScope
{
/**
* @return IApi
*/
public function getApi()
{
return $this->api;
}
/**
* @param Api $api
*/
public function setApi(Api $api)
{
$this->api = $api;
}
/**
* @ORM\ManyToOne(targetEntity="Api", inversedBy="scopes")
* @ORM\JoinColumn(name="api_id", referencedColumnName="id")
* @var Api
*/
private $api;
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getShortDescription()
{
return $this->short_description;
}
/**
* @param string $short_description
*/
public function setShortDescription($short_description)
{
$this->short_description = $short_description;
}
/**
* @return boolean
*/
public function isActive()
{
return $this->active;
}
/**
* @param boolean $active
*/
public function setActive($active)
{
$this->active = $active;
}
/**
* @ORM\Column(name="name", type="string")
* @var string
*/
private $name;
/**
* @ORM\Column(name="description", type="string")
* @var string
*/
private $description;
/**
* @return boolean
*/
public function isDefault()
{
return $this->default;
}
/**
* @param boolean $default
*/
public function setDefault($default)
{
$this->default = $default;
}
/**
* @ORM\Column(name="short_description", type="string")
* @var string
*/
private $short_description;
/**
* @ORM\Column(name="active", type="boolean")
* @var bool
*/
private $active;
/**
* @ORM\Column(name="`default`", type="boolean")
* @var bool
*/
private $default;
public function __construct()
{
parent::__construct();
$this->active = false;
$this->default = false;
}
}