src/Entity/ProInfo.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\ProInfoRepository;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. #[ORM\Entity(repositoryClassProInfoRepository::class)]
  9. class ProInfo
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $coverPhoto;
  17.     #[ORM\OneToMany(targetEntitySponsor::class, mappedBy'owner')]
  18.     private $sponsors;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $fullname;
  21.     #[ORM\OneToMany(targetEntityVideo::class, mappedBy'pro'cascade: ['persist''remove'])]
  22.     private $videos;
  23.     #[ORM\OneToMany(targetEntityPhoto::class, mappedBy'pro'cascade: ['persist''remove'])]
  24.     private $gallery;
  25.     #[ORM\Column(type'string'length255nullabletrue)]
  26.     private $website;
  27.     #[ORM\Column(type'string'length255nullabletrue)]
  28.     private $facebook;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     private $twitter;
  31.     #[ORM\Column(type'string'length255nullabletrue)]
  32.     private $instagram;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private $linkedin;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private $youtube;
  37.     #[ORM\OneToMany(targetEntityLabel::class, mappedBy'owner')]
  38.     private $labels;
  39.     #[ORM\ManyToMany(targetEntitySport::class, inversedBy'pros')]
  40.     private $sports;
  41.     #[ORM\Column(type'boolean'nullabletrue)]
  42.     private $useStripe;
  43.     #[ORM\OneToMany(targetEntityNote::class, mappedBy'pro')]
  44.     private $notes;
  45.     #[ORM\Column(type'boolean'nullabletrue)]
  46.     private $haveSubscription;
  47.     #[ORM\Column(type'boolean')]
  48.     private $pageVisible;
  49.     #[ORM\Column(type'boolean'options: ['default' => 0])]
  50.     private $isHidden false;
  51.     #[ORM\OneToOne(targetEntityUser::class, mappedBy'proInfo'cascade: ['persist''remove'])]
  52.     private $pro;
  53.     #[ORM\Column(type'string'length255nullabletrue)]
  54.     private $twitch;
  55.     #[ORM\Column(type'string'length255nullabletrue)]
  56.     private $tiktok;
  57.     #[ORM\Column(type'boolean'nullabletrue)]
  58.     private $autoRenew;
  59.     #[ORM\Column(length255nullabletrue)]
  60.     private ?string $contactEmail null;
  61.     #[ORM\Column(nullabletrue)]
  62.     private ?bool $isFreeSubscription null;
  63.     #[ORM\Column(nullabletrue)]
  64.     private ?bool $havePaymentIssue null;
  65.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  66.     private ?\DateTimeInterface $paymentDeadline null;
  67.     public function __construct()
  68.     {
  69.         $this->sponsors = new ArrayCollection();
  70.         $this->labels = new ArrayCollection();
  71.         $this->videos = new ArrayCollection();
  72.         $this->sports = new ArrayCollection();
  73.         $this->notes = new ArrayCollection();
  74.     }
  75.     public function getId(): ?int
  76.     {
  77.         return $this->id;
  78.     }
  79.     public function getCoverPhoto()
  80.     {
  81.         return $this->coverPhoto;
  82.     }
  83.     public function setCoverPhoto$coverPhoto): self
  84.     {
  85.         $this->coverPhoto $coverPhoto;
  86.         return $this;
  87.     }
  88.     /**
  89.      * @return Collection|Sponsor[]
  90.      */
  91.     public function getSponsors(): Collection
  92.     {
  93.         return $this->sponsors;
  94.     }
  95.     public function addSponsor(Sponsor $sponsor): self
  96.     {
  97.         if (!$this->sponsors->contains($sponsor)) {
  98.             $this->sponsors[] = $sponsor;
  99.             $sponsor->setOwner($this);
  100.         }
  101.         return $this;
  102.     }
  103.     public function removeSponsor(Sponsor $sponsor): self
  104.     {
  105.         if ($this->sponsors->removeElement($sponsor)) {
  106.             // set the owning side to null (unless already changed)
  107.             if ($sponsor->getOwner() === $this) {
  108.                 $sponsor->setOwner(null);
  109.             }
  110.         }
  111.         return $this;
  112.     }
  113.     public function getFullname(): ?string
  114.     {
  115.         return $this->fullname;
  116.     }
  117.     public function setFullname(?string $fullname): self
  118.     {
  119.         $this->fullname $fullname;
  120.         return $this;
  121.     }
  122.     /**
  123.      * @return Collection|Video[]
  124.      */
  125.     public function getVideos(): Collection
  126.     {
  127.         return $this->videos;
  128.     }
  129.     public function addVideo(Video $video): self
  130.     {
  131.         if (!$this->videos->contains($video)) {
  132.             $this->videos[] = $video;
  133.             $video->setPro($this);
  134.         }
  135.         return $this;
  136.     }
  137.     public function removeVideo(Video $video): self
  138.     {
  139.         if ($this->videos->removeElement($video)) {
  140.             // set the owning side to null (unless already changed)
  141.             if ($video->getPro() === $this) {
  142.                 $video->setPro(null);
  143.             }
  144.         }
  145.         return $this;
  146.     }
  147.     /**
  148.      * @return Collection|Photo[]
  149.      */
  150.     public function getGallery(): Collection
  151.     {
  152.         return $this->gallery;
  153.     }
  154.     public function addPhoto(Photo $photo): self
  155.     {
  156.         if (!$this->gallery->contains($photo)) {
  157.             $this->gallery[] = $photo;
  158.             $photo->setPro($this);
  159.         }
  160.         return $this;
  161.     }
  162.     public function removePhoto(Photo $photo): self
  163.     {
  164.         if ($this->gallery->removeElement($photo)) {
  165.             // set the owning side to null (unless already changed)
  166.             if ($photo->getPro() === $this) {
  167.                 $photo->setPro(null);
  168.             }
  169.         }
  170.         return $this;
  171.     }
  172.     public function getWebsite(): ?string
  173.     {
  174.         return $this->website;
  175.     }
  176.     public function setWebsite(?string $website): self
  177.     {
  178.         $this->website $website;
  179.         return $this;
  180.     }
  181.     public function getFacebook(): ?string
  182.     {
  183.         return $this->facebook;
  184.     }
  185.     public function setFacebook(?string $facebook): self
  186.     {
  187.         $this->facebook $facebook;
  188.         return $this;
  189.     }
  190.     public function getTwitter(): ?string
  191.     {
  192.         return $this->twitter;
  193.     }
  194.     public function setTwitter(?string $twitter): self
  195.     {
  196.         $this->twitter $twitter;
  197.         return $this;
  198.     }
  199.     public function getInstagram(): ?string
  200.     {
  201.         return $this->instagram;
  202.     }
  203.     public function setInstagram(?string $instagram): self
  204.     {
  205.         $this->instagram $instagram;
  206.         return $this;
  207.     }
  208.     public function getLinkedin(): ?string
  209.     {
  210.         return $this->linkedin;
  211.     }
  212.     public function setLinkedin(?string $linkedin): self
  213.     {
  214.         $this->linkedin $linkedin;
  215.         return $this;
  216.     }
  217.     public function getYoutube(): ?string
  218.     {
  219.         return $this->youtube;
  220.     }
  221.     public function setYoutube(?string $youtube): self
  222.     {
  223.         $this->youtube $youtube;
  224.         return $this;
  225.     }
  226.     /**
  227.      * @return Collection|Label[]
  228.      */
  229.     public function getLabels(): Collection
  230.     {
  231.         return $this->labels;
  232.     }
  233.     public function addLabel(Label $label): self
  234.     {
  235.         if (!$this->labels->contains($label)) {
  236.             $this->labels[] = $label;
  237.             $label->setOwner($this);
  238.         }
  239.         return $this;
  240.     }
  241.     public function removeLabel(Label $label): self
  242.     {
  243.         if ($this->labels->removeElement($label)) {
  244.             // set the owning side to null (unless already changed)
  245.             if ($label->getOwner() === $this) {
  246.                 $label->setOwner(null);
  247.             }
  248.         }
  249.         return $this;
  250.     }
  251.     /**
  252.      * @return Collection|Sport[]
  253.      */
  254.     public function getSports(): Collection
  255.     {
  256.         return $this->sports;
  257.     }
  258.     public function addSport(Sport $sport): self
  259.     {
  260.         if (!$this->sports->contains($sport)) {
  261.             $this->sports[] = $sport;
  262.         }
  263.         return $this;
  264.     }
  265.     public function removeSport(Sport $sport): self
  266.     {
  267.         $this->sports->removeElement($sport);
  268.         return $this;
  269.     }
  270.     public function getUseStripe(): ?bool
  271.     {
  272.         return $this->useStripe;
  273.     }
  274.     public function setUseStripe(?bool $useStripe): self
  275.     {
  276.         $this->useStripe $useStripe;
  277.         return $this;
  278.     }
  279.     /**
  280.      * @return Collection|Note[]
  281.      */
  282.     public function getNotes(): Collection
  283.     {
  284.         return $this->notes;
  285.     }
  286.     public function addNote(Note $note): self
  287.     {
  288.         if (!$this->notes->contains($note)) {
  289.             $this->notes[] = $note;
  290.             $note->setPro($this);
  291.         }
  292.         return $this;
  293.     }
  294.     public function removeNote(Note $note): self
  295.     {
  296.         if ($this->notes->removeElement($note)) {
  297.             // set the owning side to null (unless already changed)
  298.             if ($note->getPro() === $this) {
  299.                 $note->setPro(null);
  300.             }
  301.         }
  302.         return $this;
  303.     }
  304.     public function getHaveSubscription(): ?bool
  305.     {
  306.         return $this->haveSubscription;
  307.     }
  308.     public function setHaveSubscription(?bool $haveSubscription): self
  309.     {
  310.         $this->haveSubscription $haveSubscription;
  311.         return $this;
  312.     }
  313.     public function getPageVisible(): ?bool
  314.     {
  315.         return $this->pageVisible;
  316.     }
  317.     public function setPageVisible(bool $pageVisible): self
  318.     {
  319.         $this->pageVisible $pageVisible;
  320.         return $this;
  321.     }
  322.     public function getIsHidden(): ?bool
  323.     {
  324.         return $this->isHidden;
  325.     }
  326.     public function setIsHidden(bool $isHidden): self
  327.     {
  328.         $this->isHidden $isHidden;
  329.         return $this;
  330.     }
  331.     public function getPro(): ?User
  332.     {
  333.         return $this->pro;
  334.     }
  335.     public function setPro(?User $user): self
  336.     {
  337.         // unset the owning side of the relation if necessary
  338.         if ($user === null && $this->pro !== null) {
  339.             $this->pro->setProInfo(null);
  340.         }
  341.         // set the owning side of the relation if necessary
  342.         if ($user !== null && $user->getProInfo() !== $this) {
  343.             $user->setProInfo($this);
  344.         }
  345.         $this->pro $user;
  346.         return $this;
  347.     }
  348.     public function getTwitch(): ?string
  349.     {
  350.         return $this->twitch;
  351.     }
  352.     public function setTwitch(?string $twitch): self
  353.     {
  354.         $this->twitch $twitch;
  355.         return $this;
  356.     }
  357.     public function getTiktok(): ?string
  358.     {
  359.         return $this->tiktok;
  360.     }
  361.     public function setTiktok(?string $tiktok): self
  362.     {
  363.         $this->tiktok $tiktok;
  364.         return $this;
  365.     }
  366.     public function getAutoRenew(): ?bool
  367.     {
  368.         return $this->autoRenew;
  369.     }
  370.     public function setAutoRenew(?bool $autoRenew): self
  371.     {
  372.         $this->autoRenew $autoRenew;
  373.         return $this;
  374.     }
  375.     public function getContactEmail(): ?string
  376.     {
  377.         return $this->contactEmail;
  378.     }
  379.     public function setContactEmail(?string $contactEmail): static
  380.     {
  381.         $this->contactEmail $contactEmail;
  382.         return $this;
  383.     }
  384.     public function getIsFreeSubscription(): ?bool
  385.     {
  386.         return $this->isFreeSubscription;
  387.     }
  388.     public function setIsFreeSubscription(?bool $isFreeSubscription): static
  389.     {
  390.         $this->isFreeSubscription $isFreeSubscription;
  391.         return $this;
  392.     }
  393.     public function getHavePaymentIssue(): ?bool
  394.     {
  395.         return $this->havePaymentIssue;
  396.     }
  397.     public function setHavePaymentIssue(?bool $havePaymentIssue): static
  398.     {
  399.         $this->havePaymentIssue $havePaymentIssue;
  400.         return $this;
  401.     }
  402.     public function getPaymentDeadline(): ?\DateTimeInterface
  403.     {
  404.         return $this->paymentDeadline;
  405.     }
  406.     public function setPaymentDeadline(?\DateTimeInterface $paymentDeadline): static
  407.     {
  408.         $this->paymentDeadline $paymentDeadline;
  409.         return $this;
  410.     }
  411.     
  412. }