| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Token;
- use ApiPlatform\Metadata\ApiResource;
- use App\Entity\Access\Access;
- use Doctrine\ORM\Mapping as ORM;
- #[ApiResource(operations: [])]
- #[ORM\Entity]
- class Token
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private int $id;
- #[ORM\ManyToOne(targetEntity: Access::class, cascade: [], inversedBy: 'tokens')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- private Access $access;
- public function getId(): int
- {
- return $this->id;
- }
- public function setId(int $id): self
- {
- $this->id = $id;
- return $this;
- }
- public function getAccess(): Access
- {
- return $this->access;
- }
- public function setAccess(Access $access): self
- {
- $this->access = $access;
- return $this;
- }
- }
|