src/Entity/Alert.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AlertRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassAlertRepository::class)]
  9. class Alert
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $place;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private $begin;
  19.     #[ORM\Column(type'boolean')]
  20.     private $emailActivated;
  21.     #[ORM\ManyToMany(targetEntitySport::class)]
  22.     private $sports;
  23.     #[ORM\ManyToOne(targetEntityTrainee::class, inversedBy'alerts')]
  24.     private $trainee;
  25.     #[ORM\ManyToMany(targetEntityLevel::class)]
  26.     private $levels;
  27.     #[ORM\ManyToMany(targetEntityLanguage::class)]
  28.     private $languages;
  29.     #[ORM\ManyToMany(targetEntityAge::class)]
  30.     private $ages;
  31.     #[ORM\Column(type'string'length255nullabletrue)]
  32.     private $countryCode;
  33.     #[ORM\Column(type'string'length255)]
  34.     private $title;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $placeName null;
  37.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  38.     private ?\DateTimeInterface $createdAt null;
  39.     public function __construct()
  40.     {
  41.         $this->sports = new ArrayCollection();
  42.         $this->levels = new ArrayCollection();
  43.         $this->languages = new ArrayCollection();
  44.         $this->ages = new ArrayCollection();
  45.     }
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getPlace(): ?string
  51.     {
  52.         return $this->place;
  53.     }
  54.     public function setPlace(?string $place): self
  55.     {
  56.         $this->place $place;
  57.         return $this;
  58.     }
  59.     public function getBegin(): ?string
  60.     {
  61.         return $this->begin;
  62.     }
  63.     public function setBegin(?string $begin): self
  64.     {
  65.         $this->begin $begin;
  66.         return $this;
  67.     }
  68.     public function getEmailActivated(): ?bool
  69.     {
  70.         return $this->emailActivated;
  71.     }
  72.     public function setEmailActivated(bool $emailActivated): self
  73.     {
  74.         $this->emailActivated $emailActivated;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return Collection|Sport[]
  79.      */
  80.     public function getSports(): Collection
  81.     {
  82.         return $this->sports;
  83.     }
  84.     public function addSport(Sport $sport): self
  85.     {
  86.         if (!$this->sports->contains($sport)) {
  87.             $this->sports[] = $sport;
  88.         }
  89.         return $this;
  90.     }
  91.     public function removeSport(Sport $sport): self
  92.     {
  93.         $this->sports->removeElement($sport);
  94.         return $this;
  95.     }
  96.     public function getTrainee(): ?Trainee
  97.     {
  98.         return $this->trainee;
  99.     }
  100.     public function setTrainee(?Trainee $trainee): self
  101.     {
  102.         $this->trainee $trainee;
  103.         return $this;
  104.     }
  105.     /**
  106.      * @return Collection|Level[]
  107.      */
  108.     public function getLevels(): Collection
  109.     {
  110.         return $this->levels;
  111.     }
  112.     public function addLevel(Level $level): self
  113.     {
  114.         if (!$this->levels->contains($level)) {
  115.             $this->levels[] = $level;
  116.         }
  117.         return $this;
  118.     }
  119.     public function removeLevel(Level $level): self
  120.     {
  121.         $this->levels->removeElement($level);
  122.         return $this;
  123.     }
  124.     /**
  125.      * @return Collection|Language[]
  126.      */
  127.     public function getLanguages(): Collection
  128.     {
  129.         return $this->languages;
  130.     }
  131.     public function addLanguage(Language $language): self
  132.     {
  133.         if (!$this->languages->contains($language)) {
  134.             $this->languages[] = $language;
  135.         }
  136.         return $this;
  137.     }
  138.     public function removeLanguage(Language $language): self
  139.     {
  140.         $this->languages->removeElement($language);
  141.         return $this;
  142.     }
  143.     /**
  144.      * @return Collection|Age[]
  145.      */
  146.     public function getAges(): Collection
  147.     {
  148.         return $this->ages;
  149.     }
  150.     public function addAge(Age $age): self
  151.     {
  152.         if (!$this->ages->contains($age)) {
  153.             $this->ages[] = $age;
  154.         }
  155.         return $this;
  156.     }
  157.     public function removeAge(Age $age): self
  158.     {
  159.         $this->ages->removeElement($age);
  160.         return $this;
  161.     }
  162.     public function getCountryCode(): ?string
  163.     {
  164.         return $this->countryCode;
  165.     }
  166.     public function setCountryCode(?string $countryCode): self
  167.     {
  168.         $this->countryCode $countryCode;
  169.         return $this;
  170.     }
  171.     public function getTitle(): ?string
  172.     {
  173.         return $this->title;
  174.     }
  175.     public function setTitle(string $title): self
  176.     {
  177.         $this->title $title;
  178.         return $this;
  179.     }
  180.     public function getPlaceName(): ?string
  181.     {
  182.         return $this->placeName;
  183.     }
  184.     public function setPlaceName(?string $placeName): static
  185.     {
  186.         $this->placeName $placeName;
  187.         return $this;
  188.     }
  189.     public function getCreatedAt(): ?\DateTimeInterface
  190.     {
  191.         return $this->createdAt;
  192.     }
  193.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  194.     {
  195.         $this->createdAt $createdAt;
  196.         return $this;
  197.     }
  198. }