<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\ProInfoRepository;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
#[ORM\Entity(repositoryClass: ProInfoRepository::class)]
class ProInfo
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $coverPhoto;
#[ORM\OneToMany(targetEntity: Sponsor::class, mappedBy: 'owner')]
private $sponsors;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $fullname;
#[ORM\OneToMany(targetEntity: Video::class, mappedBy: 'pro', cascade: ['persist', 'remove'])]
private $videos;
#[ORM\OneToMany(targetEntity: Photo::class, mappedBy: 'pro', cascade: ['persist', 'remove'])]
private $gallery;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $website;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $facebook;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $twitter;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $instagram;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $linkedin;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $youtube;
#[ORM\OneToMany(targetEntity: Label::class, mappedBy: 'owner')]
private $labels;
#[ORM\ManyToMany(targetEntity: Sport::class, inversedBy: 'pros')]
private $sports;
#[ORM\Column(type: 'boolean', nullable: true)]
private $useStripe;
#[ORM\OneToMany(targetEntity: Note::class, mappedBy: 'pro')]
private $notes;
#[ORM\Column(type: 'boolean', nullable: true)]
private $haveSubscription;
#[ORM\Column(type: 'boolean')]
private $pageVisible;
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
private $isHidden = false;
#[ORM\OneToOne(targetEntity: User::class, mappedBy: 'proInfo', cascade: ['persist', 'remove'])]
private $pro;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $twitch;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $tiktok;
#[ORM\Column(type: 'boolean', nullable: true)]
private $autoRenew;
#[ORM\Column(length: 255, nullable: true)]
private ?string $contactEmail = null;
#[ORM\Column(nullable: true)]
private ?bool $isFreeSubscription = null;
#[ORM\Column(nullable: true)]
private ?bool $havePaymentIssue = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $paymentDeadline = null;
public function __construct()
{
$this->sponsors = new ArrayCollection();
$this->labels = new ArrayCollection();
$this->videos = new ArrayCollection();
$this->sports = new ArrayCollection();
$this->notes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCoverPhoto()
{
return $this->coverPhoto;
}
public function setCoverPhoto( $coverPhoto): self
{
$this->coverPhoto = $coverPhoto;
return $this;
}
/**
* @return Collection|Sponsor[]
*/
public function getSponsors(): Collection
{
return $this->sponsors;
}
public function addSponsor(Sponsor $sponsor): self
{
if (!$this->sponsors->contains($sponsor)) {
$this->sponsors[] = $sponsor;
$sponsor->setOwner($this);
}
return $this;
}
public function removeSponsor(Sponsor $sponsor): self
{
if ($this->sponsors->removeElement($sponsor)) {
// set the owning side to null (unless already changed)
if ($sponsor->getOwner() === $this) {
$sponsor->setOwner(null);
}
}
return $this;
}
public function getFullname(): ?string
{
return $this->fullname;
}
public function setFullname(?string $fullname): self
{
$this->fullname = $fullname;
return $this;
}
/**
* @return Collection|Video[]
*/
public function getVideos(): Collection
{
return $this->videos;
}
public function addVideo(Video $video): self
{
if (!$this->videos->contains($video)) {
$this->videos[] = $video;
$video->setPro($this);
}
return $this;
}
public function removeVideo(Video $video): self
{
if ($this->videos->removeElement($video)) {
// set the owning side to null (unless already changed)
if ($video->getPro() === $this) {
$video->setPro(null);
}
}
return $this;
}
/**
* @return Collection|Photo[]
*/
public function getGallery(): Collection
{
return $this->gallery;
}
public function addPhoto(Photo $photo): self
{
if (!$this->gallery->contains($photo)) {
$this->gallery[] = $photo;
$photo->setPro($this);
}
return $this;
}
public function removePhoto(Photo $photo): self
{
if ($this->gallery->removeElement($photo)) {
// set the owning side to null (unless already changed)
if ($photo->getPro() === $this) {
$photo->setPro(null);
}
}
return $this;
}
public function getWebsite(): ?string
{
return $this->website;
}
public function setWebsite(?string $website): self
{
$this->website = $website;
return $this;
}
public function getFacebook(): ?string
{
return $this->facebook;
}
public function setFacebook(?string $facebook): self
{
$this->facebook = $facebook;
return $this;
}
public function getTwitter(): ?string
{
return $this->twitter;
}
public function setTwitter(?string $twitter): self
{
$this->twitter = $twitter;
return $this;
}
public function getInstagram(): ?string
{
return $this->instagram;
}
public function setInstagram(?string $instagram): self
{
$this->instagram = $instagram;
return $this;
}
public function getLinkedin(): ?string
{
return $this->linkedin;
}
public function setLinkedin(?string $linkedin): self
{
$this->linkedin = $linkedin;
return $this;
}
public function getYoutube(): ?string
{
return $this->youtube;
}
public function setYoutube(?string $youtube): self
{
$this->youtube = $youtube;
return $this;
}
/**
* @return Collection|Label[]
*/
public function getLabels(): Collection
{
return $this->labels;
}
public function addLabel(Label $label): self
{
if (!$this->labels->contains($label)) {
$this->labels[] = $label;
$label->setOwner($this);
}
return $this;
}
public function removeLabel(Label $label): self
{
if ($this->labels->removeElement($label)) {
// set the owning side to null (unless already changed)
if ($label->getOwner() === $this) {
$label->setOwner(null);
}
}
return $this;
}
/**
* @return Collection|Sport[]
*/
public function getSports(): Collection
{
return $this->sports;
}
public function addSport(Sport $sport): self
{
if (!$this->sports->contains($sport)) {
$this->sports[] = $sport;
}
return $this;
}
public function removeSport(Sport $sport): self
{
$this->sports->removeElement($sport);
return $this;
}
public function getUseStripe(): ?bool
{
return $this->useStripe;
}
public function setUseStripe(?bool $useStripe): self
{
$this->useStripe = $useStripe;
return $this;
}
/**
* @return Collection|Note[]
*/
public function getNotes(): Collection
{
return $this->notes;
}
public function addNote(Note $note): self
{
if (!$this->notes->contains($note)) {
$this->notes[] = $note;
$note->setPro($this);
}
return $this;
}
public function removeNote(Note $note): self
{
if ($this->notes->removeElement($note)) {
// set the owning side to null (unless already changed)
if ($note->getPro() === $this) {
$note->setPro(null);
}
}
return $this;
}
public function getHaveSubscription(): ?bool
{
return $this->haveSubscription;
}
public function setHaveSubscription(?bool $haveSubscription): self
{
$this->haveSubscription = $haveSubscription;
return $this;
}
public function getPageVisible(): ?bool
{
return $this->pageVisible;
}
public function setPageVisible(bool $pageVisible): self
{
$this->pageVisible = $pageVisible;
return $this;
}
public function getIsHidden(): ?bool
{
return $this->isHidden;
}
public function setIsHidden(bool $isHidden): self
{
$this->isHidden = $isHidden;
return $this;
}
public function getPro(): ?User
{
return $this->pro;
}
public function setPro(?User $user): self
{
// unset the owning side of the relation if necessary
if ($user === null && $this->pro !== null) {
$this->pro->setProInfo(null);
}
// set the owning side of the relation if necessary
if ($user !== null && $user->getProInfo() !== $this) {
$user->setProInfo($this);
}
$this->pro = $user;
return $this;
}
public function getTwitch(): ?string
{
return $this->twitch;
}
public function setTwitch(?string $twitch): self
{
$this->twitch = $twitch;
return $this;
}
public function getTiktok(): ?string
{
return $this->tiktok;
}
public function setTiktok(?string $tiktok): self
{
$this->tiktok = $tiktok;
return $this;
}
public function getAutoRenew(): ?bool
{
return $this->autoRenew;
}
public function setAutoRenew(?bool $autoRenew): self
{
$this->autoRenew = $autoRenew;
return $this;
}
public function getContactEmail(): ?string
{
return $this->contactEmail;
}
public function setContactEmail(?string $contactEmail): static
{
$this->contactEmail = $contactEmail;
return $this;
}
public function getIsFreeSubscription(): ?bool
{
return $this->isFreeSubscription;
}
public function setIsFreeSubscription(?bool $isFreeSubscription): static
{
$this->isFreeSubscription = $isFreeSubscription;
return $this;
}
public function getHavePaymentIssue(): ?bool
{
return $this->havePaymentIssue;
}
public function setHavePaymentIssue(?bool $havePaymentIssue): static
{
$this->havePaymentIssue = $havePaymentIssue;
return $this;
}
public function getPaymentDeadline(): ?\DateTimeInterface
{
return $this->paymentDeadline;
}
public function setPaymentDeadline(?\DateTimeInterface $paymentDeadline): static
{
$this->paymentDeadline = $paymentDeadline;
return $this;
}
}