* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShopBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** * @ORM\Entity(repositoryClass="PrestaShopBundle\Entity\Repository\ApiAccessRepository") * @ORM\Table() * @UniqueEntity("name") * * @experimental */ class ApiAccess { /** * @var int * * @ORM\Id * @ORM\Column(name="id_api_access", type="integer", options={"unsigned":true}) * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="client_id", type="string", length=255) */ private $clientId; /** * @var string * * @ORM\Column(name="client_secret", type="string", length=255) */ private $clientSecret; /** * @var AuthorizedApplication * * @ORM\ManyToOne(targetEntity=AuthorizedApplication::class) * @ORM\JoinColumn(name="id_authorized_application", referencedColumnName="id_authorized_application", nullable=false, onDelete="CASCADE") */ private $authorizedApplication; /** * @var bool * * @ORM\Column(name="active", type="boolean") */ private $active; /** * @ORM\Column(name="scopes", type="array") */ private $scopes = []; /** * @return int */ public function getId(): int { return $this->id; } /** * @param int $id */ public function setId(int $id): void { $this->id = $id; } /** * @return string */ public function getClientId(): string { return $this->clientId; } /** * @param string $clientId */ public function setClientId(string $clientId): void { $this->clientId = $clientId; } /** * @return string */ public function getClientSecret(): string { return $this->clientSecret; } /** * @param mixed $clientSecret */ public function setClientSecret($clientSecret): void { $this->clientSecret = $clientSecret; } /** * @return AuthorizedApplication */ public function getAuthorizedApplication(): AuthorizedApplication { return $this->authorizedApplication; } /** * @param AuthorizedApplication $authorizedApplication */ public function setAuthorizedApplication(AuthorizedApplication $authorizedApplication): void { $this->authorizedApplication = $authorizedApplication; } /** * @return bool */ public function isActive(): bool { return $this->active; } /** * @param bool $active */ public function setActive(bool $active): void { $this->active = $active; } /** * @return array */ public function getScopes(): array { return $this->scopes; } /** * @param array $scopes */ public function setScopes(array $scopes): void { $this->scopes = $scopes; } }