
in order to improve query performance added L2 cache configuration to some queries and classes. also updated doctrine version. Change-Id: I86ac24b65a28919de411b024c7ad175747630f6e
158 lines
3.1 KiB
PHP
158 lines
3.1 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", cascade={"persist"})
|
|
* @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;
|
|
} |