<?php
namespace App\Entity;
use App\Repository\AdhesionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AdhesionRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class Adhesion extends BaseEntity
{
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $AverageNumberOfFollowrs;
/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
private $website;
/**
* @ORM\Column(type="array", length=255, nullable=true)
*/
private $ContactOption;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $Username;
/**
* @ORM\Column(type="time", nullable=true)
*/
private $timeFrom;
/**
* @ORM\Column(type="time", nullable=true)
*/
private $timeTo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $type;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $category;
/**
* @ORM\Column(type="string", length=255, nullable=false)
* Accepted value: 'New','Progressing', 'Accepted','Refused','Contourned (un statut pour dire qu'un role est affecte sans acceptation'
*/
private $state;
/**
* @ORM\Column(type="string", length=255)
*/
private $media;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emailContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $skypeContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $instaContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $watsContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phoneContact;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $twitterContact;
/**
* @ORM\OneToOne(targetEntity=User::class, inversedBy="adhesion", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\OneToMany(targetEntity=SocialAdhesion::class, mappedBy="Adhesion", cascade={"persist", "remove"})
*/
private $socialAdhesions;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\SuperAdmin")
*/
private $validateBy;
/**
* @ORM\Column(type="datetime", options={"default" = "CURRENT_TIMESTAMP"}, nullable=true)
*/
protected $validateAt;
public function __construct()
{
$this->state = "New";
$this->socialAdhesions = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getAverageNumberOfFollowrs(): ?int
{
return $this->AverageNumberOfFollowrs;
}
public function setAverageNumberOfFollowrs(?int $AverageNumberOfFollowrs): self
{
$this->AverageNumberOfFollowrs = $AverageNumberOfFollowrs;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getWebsite(): ?string
{
return $this->website;
}
public function setWebsite(string $website): self
{
$this->website = $website;
return $this;
}
public function getContactOption(): ?array
{
return $this->ContactOption;
}
public function setContactOption(?array $ContactOption): self
{
$this->ContactOption = $ContactOption;
return $this;
}
public function getUserName(): ?string
{
return $this->Username;
}
public function setUserName(?string $Username): self
{
$this->Username = $Username;
return $this;
}
public function getTimeFrom(): ?\DateTimeInterface
{
return $this->timeFrom;
}
public function setTimeFrom(?\DateTimeInterface $timeFrom): self
{
$this->timeFrom = $timeFrom;
return $this;
}
public function getTimeTo(): ?\DateTimeInterface
{
return $this->timeTo;
}
public function setTimeTo(?\DateTimeInterface $timeTo): self
{
$this->timeTo = $timeTo;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(?string $category): self
{
$this->category = $category;
return $this;
}
public function __toString()
{
return $this->Username;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(User $user): self
{
$this->user = $user;
return $this;
}
public function getState(): ?string
{
return $this->state;
}
public function setState(string $state): self
{
$this->state = $state;
return $this;
}
public function getMedia(): ?string
{
return $this->media;
}
public function setMedia(string $media): self
{
$this->media = $media;
return $this;
}
public function getEmailContact(): ?string
{
return $this->emailContact;
}
public function setEmailContact(string $emailContact): self
{
$this->emailContact = $emailContact;
return $this;
}
public function getSkypeContact(): ?string
{
return $this->skypeContact;
}
public function setSkypeContact(string $skypeContact): self
{
$this->skypeContact = $skypeContact;
return $this;
}
public function getInstaContact(): ?string
{
return $this->skypeContact;
}
public function setInstaContact(string $instaContact): self
{
$this->instaContact = $instaContact;
return $this;
}
public function getWatsContact(): ?string
{
return $this->watsContact;
}
public function setWatsContact(string $watsContact): self
{
$this->watsContact = $watsContact;
return $this;
}
public function getPhoneContact(): ?string
{
return $this->phoneContact;
}
public function setPhoneContact(string $phoneContact): self
{
$this->phoneContact = $phoneContact;
return $this;
}
public function getTwitterContact(): ?string
{
return $this->twitterContact;
}
public function setTwitterContact(string $twitterContact): self
{
$this->twitterContact = $twitterContact;
return $this;
}
/**
* @return Collection|SocialAdhesion[]
*/
public function getSocialAdhesions(): Collection
{
return $this->socialAdhesions;
}
public function addSocialAdhesion(SocialAdhesion $socialAdhesion): self
{
if (!$this->socialAdhesions->contains($socialAdhesion)) {
$this->socialAdhesions[] = $socialAdhesion;
$socialAdhesion->setAdhesion($this);
}
return $this;
}
public function removeSocialAdhesion(SocialAdhesion $socialAdhesion): self
{
if ($this->socialAdhesions->removeElement($socialAdhesion)) {
// set the owning side to null (unless already changed)
if ($socialAdhesion->getAdhesion() === $this) {
$socialAdhesion->setAdhesion(null);
}
}
return $this;
}
public function getValidateAt(): ?\DateTimeInterface
{
return $this->validateAt;
}
public function setValidateAt(\DateTimeInterface $validateAt): self
{
$this->validateAt = $validateAt;
return $this;
}
public function getValidateBy(): ?SuperAdmin
{
return $this->validateBy;
}
public function setValidateBy(?SuperAdmin $validateBy): self
{
$this->validateBy = $validateBy;
return $this;
}
}