src/Entity/AccountBlock.php line 12
<?phpnamespace App\Entity;use App\Repository\AccountBlockRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AccountBlockRepository::class)]class AccountBlock{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'accountBlocks')]#[ORM\JoinColumn(nullable: false)]private ?Account $account = null;#[ORM\ManyToOne(inversedBy: 'accountBlocks')]#[ORM\JoinColumn(nullable: false)]private ?Block $block = null;#[ORM\ManyToMany(targetEntity: Question::class)]private Collection $activeQuestions;#[ORM\Column(type: Types::JSON, nullable: true)]private array $usedQuestions = [];public function __construct(){$this->activeQuestions = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getAccount(): ?Account{return $this->account;}public function setAccount(?Account $account): self{$this->account = $account;return $this;}public function getBlock(): ?Block{return $this->block;}public function setBlock(?Block $block): self{$this->block = $block;return $this;}/*** @return Collection<int, Question>*/public function getActiveQuestions(): ?Collection{return $this->activeQuestions;}public function addActiveQuestion(Question $activeQuestion): self{if (!$this->activeQuestions->contains($activeQuestion)) {$this->activeQuestions->add($activeQuestion);}return $this;}public function removeActiveQuestion(Question $activeQuestion): self{$this->activeQuestions->removeElement($activeQuestion);return $this;}public function getUsedQuestions(): array{return $this->usedQuestions;}public function setUsedQuestions(?array $usedQuestions): self{$this->usedQuestions = $usedQuestions;return $this;}}