src/Entity/BFSubscription.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\BFSubscriptionRepository")
  7.  * @UniqueEntity({"festival", "challenge"})
  8.  */
  9. class BFSubscription
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\BFFestival", inversedBy="subscriptions")
  19.      * @ORM\JoinColumn(nullable=true)
  20.      */
  21.     private $festival;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\BFUser", inversedBy="subscriptions")
  24.      * @ORM\JoinColumn(nullable=true)
  25.      */
  26.     private $user;
  27.     /**
  28.      * @ORM\Column(type="datetime")
  29.      */
  30.     private $subscriptionsdate;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\BFChallenge", inversedBy="subscriptions")
  33.      * @ORM\JoinColumn(nullable=true)
  34.      */
  35.     private $challenge;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getFestival(): ?BFFestival
  41.     {
  42.         return $this->festival;
  43.     }
  44.     public function setFestival(?BFFestival $festival): self
  45.     {
  46.         $this->festival $festival;
  47.         return $this;
  48.     }
  49.     public function getUser(): ?BFUser
  50.     {
  51.         return $this->user;
  52.     }
  53.     public function setUser(?BFUser $user): self
  54.     {
  55.         $this->user $user;
  56.         return $this;
  57.     }
  58.     public function getSubscriptionsdate(): ?\DateTimeInterface
  59.     {
  60.         return $this->subscriptionsdate;
  61.     }
  62.     public function setSubscriptionsdate(\DateTimeInterface $subscriptionsdate): self
  63.     {
  64.         $this->subscriptionsdate $subscriptionsdate;
  65.         return $this;
  66.     }
  67.     public function getChallenge(): ?BFChallenge
  68.     {
  69.         return $this->challenge;
  70.     }
  71.     public function setChallenge(?BFChallenge $challenge): self
  72.     {
  73.         $this->challenge $challenge;
  74.         return $this;
  75.     }
  76. }