<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass="App\Repository\BFSubscriptionRepository")
* @UniqueEntity({"festival", "challenge"})
*/
class BFSubscription
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\BFFestival", inversedBy="subscriptions")
* @ORM\JoinColumn(nullable=true)
*/
private $festival;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\BFUser", inversedBy="subscriptions")
* @ORM\JoinColumn(nullable=true)
*/
private $user;
/**
* @ORM\Column(type="datetime")
*/
private $subscriptionsdate;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\BFChallenge", inversedBy="subscriptions")
* @ORM\JoinColumn(nullable=true)
*/
private $challenge;
public function getId(): ?int
{
return $this->id;
}
public function getFestival(): ?BFFestival
{
return $this->festival;
}
public function setFestival(?BFFestival $festival): self
{
$this->festival = $festival;
return $this;
}
public function getUser(): ?BFUser
{
return $this->user;
}
public function setUser(?BFUser $user): self
{
$this->user = $user;
return $this;
}
public function getSubscriptionsdate(): ?\DateTimeInterface
{
return $this->subscriptionsdate;
}
public function setSubscriptionsdate(\DateTimeInterface $subscriptionsdate): self
{
$this->subscriptionsdate = $subscriptionsdate;
return $this;
}
public function getChallenge(): ?BFChallenge
{
return $this->challenge;
}
public function setChallenge(?BFChallenge $challenge): self
{
$this->challenge = $challenge;
return $this;
}
}