| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\AccessWish;
- // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Famille à laquelle est rattaché un AccessWish.
- */
- // #[Auditable]
- #[ORM\Entity]
- class AccessFamilyWish
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private ?int $id = null;
- #[ORM\OneToMany(mappedBy: 'accessFamilyWish', targetEntity: AccessWish::class, cascade: ['remove'])]
- private Collection $accessWishes;
- /**
- * Date de dernière mise à jour de l'entité.
- */
- #[ORM\Column(type: 'datetime', nullable: true)]
- private \DateTimeInterface $updateDate;
- #[ORM\Column]
- private bool $registrationCompleted = false;
- #[ORM\Column]
- private bool $closeRegistration = false;
- public function __construct()
- {
- $this->accessWishes = new ArrayCollection();
- }
- public function getId(): ?int
- {
- return $this->id;
- }
- /**
- * @return Collection<int, AccessWish>
- */
- public function getAccessWishes(): Collection
- {
- return $this->accessWishes;
- }
- public function addAccessWish(AccessWish $accessWish): self
- {
- if (!$this->accessWishes->contains($accessWish)) {
- $this->accessWishes[] = $accessWish;
- $accessWish->setAccessFamilyWish($this);
- }
- return $this;
- }
- public function removeAccessWish(AccessWish $accessWish): self
- {
- if ($this->accessWishes->removeElement($accessWish)) {
- // set the owning side to null (unless already changed)
- if ($accessWish->getAccessFamilyWish() === $this) {
- $accessWish->setAccessFamilyWish(null);
- }
- }
- return $this;
- }
- public function getUpdateDate(): \DateTimeInterface
- {
- return $this->updateDate;
- }
- public function setUpdateDate(\DateTimeInterface $updateDate): void
- {
- $this->updateDate = $updateDate;
- }
- public function isRegistrationCompleted(): bool
- {
- return $this->registrationCompleted;
- }
- public function setRegistrationCompleted(bool $registrationCompleted): void
- {
- $this->registrationCompleted = $registrationCompleted;
- }
- public function isCloseRegistration(): bool
- {
- return $this->closeRegistration;
- }
- public function setCloseRegistration(bool $closeRegistration): void
- {
- $this->closeRegistration = $closeRegistration;
- }
- }
|