src/Entity/Adhesion.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdhesionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=AdhesionRepository::class)
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class Adhesion extends BaseEntity
  12. {
  13.     /**
  14.      * @ORM\Column(type="integer", nullable=true)
  15.      */
  16.     private $AverageNumberOfFollowrs;
  17.     /**
  18.      * @ORM\Column(type="string", length=180, nullable=true)
  19.      */
  20.     private $website;
  21.     /**
  22.      * @ORM\Column(type="array", length=255, nullable=true)
  23.      */
  24.     private $ContactOption;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $Username;
  29.     /**
  30.      * @ORM\Column(type="time", nullable=true)
  31.      */
  32.     private $timeFrom;
  33.     /**
  34.      * @ORM\Column(type="time", nullable=true)
  35.      */
  36.     private $timeTo;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $type;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $category;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=false)
  47.      * Accepted value: 'New','Progressing', 'Accepted','Refused','Contourned (un statut pour dire qu'un role est affecte sans acceptation'
  48.      */
  49.     private $state;
  50.     /**
  51.      * @ORM\Column(type="string", length=255)
  52.      */
  53.     private $media;
  54.     /**
  55.      * @ORM\Column(type="string", length=255,  nullable=true)
  56.      */
  57.     private $emailContact;
  58.     /**
  59.      * @ORM\Column(type="string", length=255,  nullable=true)
  60.      */
  61.     private $skypeContact;
  62.     /**
  63.      * @ORM\Column(type="string", length=255,  nullable=true)
  64.      */
  65.     private $instaContact;
  66.     /**
  67.      * @ORM\Column(type="string", length=255,  nullable=true)
  68.      */
  69.     private $watsContact;
  70.     /**
  71.      * @ORM\Column(type="string", length=255,  nullable=true)
  72.      */
  73.     private $phoneContact;
  74.     /**
  75.      * @ORM\Column(type="string", length=255,  nullable=true)
  76.      */
  77.     private $twitterContact;
  78.     /**
  79.      * @ORM\OneToOne(targetEntity=User::class, inversedBy="adhesion", cascade={"persist", "remove"})
  80.      * @ORM\JoinColumn(nullable=false)
  81.      */
  82.     private $user;
  83.     /**
  84.      * @ORM\OneToMany(targetEntity=SocialAdhesion::class, mappedBy="Adhesion", cascade={"persist", "remove"})
  85.      */
  86.     private $socialAdhesions;
  87.     /**
  88.      * @ORM\ManyToOne(targetEntity="App\Entity\SuperAdmin")
  89.      */
  90.     private $validateBy;
  91.     /**
  92.      * @ORM\Column(type="datetime", options={"default" = "CURRENT_TIMESTAMP"},  nullable=true)
  93.      */
  94.     protected $validateAt;
  95.     public function __construct()
  96.     {
  97.         $this->state "New";
  98.         $this->socialAdhesions = new ArrayCollection();
  99.     }
  100.     public function getId(): ?int
  101.     {
  102.         return $this->id;
  103.     }
  104.     public function getAverageNumberOfFollowrs(): ?int
  105.     {
  106.         return $this->AverageNumberOfFollowrs;
  107.     }
  108.     public function setAverageNumberOfFollowrs(?int $AverageNumberOfFollowrs): self
  109.     {
  110.         $this->AverageNumberOfFollowrs $AverageNumberOfFollowrs;
  111.         return $this;
  112.     }
  113.     public function getEmail(): ?string
  114.     {
  115.         return $this->email;
  116.     }
  117.     public function setEmail(string $email): self
  118.     {
  119.         $this->email $email;
  120.         return $this;
  121.     }
  122.     public function getWebsite(): ?string
  123.     {
  124.         return $this->website;
  125.     }
  126.     public function setWebsite(string $website): self
  127.     {
  128.         $this->website $website;
  129.         return $this;
  130.     }
  131.     public function getContactOption(): ?array
  132.     {
  133.         return $this->ContactOption;
  134.     }
  135.     public function setContactOption(?array $ContactOption): self
  136.     {
  137.         $this->ContactOption $ContactOption;
  138.         return $this;
  139.     }
  140.     public function getUserName(): ?string
  141.     {
  142.         return $this->Username;
  143.     }
  144.     public function setUserName(?string $Username): self
  145.     {
  146.         $this->Username $Username;
  147.         return $this;
  148.     }
  149.     public function getTimeFrom(): ?\DateTimeInterface
  150.     {
  151.         return $this->timeFrom;
  152.     }
  153.     public function setTimeFrom(?\DateTimeInterface $timeFrom): self
  154.     {
  155.         $this->timeFrom $timeFrom;
  156.         return $this;
  157.     }
  158.     public function getTimeTo(): ?\DateTimeInterface
  159.     {
  160.         return $this->timeTo;
  161.     }
  162.     public function setTimeTo(?\DateTimeInterface $timeTo): self
  163.     {
  164.         $this->timeTo $timeTo;
  165.         return $this;
  166.     }
  167.     public function getType(): ?string
  168.     {
  169.         return $this->type;
  170.     }
  171.     public function setType(?string $type): self
  172.     {
  173.         $this->type $type;
  174.         return $this;
  175.     }
  176.     public function getCategory(): ?string
  177.     {
  178.         return $this->category;
  179.     }
  180.     public function setCategory(?string $category): self
  181.     {
  182.         $this->category $category;
  183.         return $this;
  184.     }
  185.     public function __toString()
  186.     {
  187.         return $this->Username;
  188.     }
  189.     public function getUser(): ?User
  190.     {
  191.         return $this->user;
  192.     }
  193.     public function setUser(User $user): self
  194.     {
  195.         $this->user $user;
  196.         return $this;
  197.     }
  198.     public function getState(): ?string
  199.     {
  200.         return $this->state;
  201.     }
  202.     public function setState(string $state): self
  203.     {
  204.         $this->state $state;
  205.         return $this;
  206.     }
  207.     public function getMedia(): ?string
  208.     {
  209.         return $this->media;
  210.     }
  211.     public function setMedia(string $media): self
  212.     {
  213.         $this->media $media;
  214.         return $this;
  215.     }
  216.     public function getEmailContact(): ?string
  217.     {
  218.         return $this->emailContact;
  219.     }
  220.     public function setEmailContact(string $emailContact): self
  221.     {
  222.         $this->emailContact $emailContact;
  223.         return $this;
  224.     }
  225.     public function getSkypeContact(): ?string
  226.     {
  227.         return $this->skypeContact;
  228.     }
  229.     public function setSkypeContact(string $skypeContact): self
  230.     {
  231.         $this->skypeContact $skypeContact;
  232.         return $this;
  233.     }
  234.     public function getInstaContact(): ?string
  235.     {
  236.         return $this->skypeContact;
  237.     }
  238.     public function setInstaContact(string $instaContact): self
  239.     {
  240.         $this->instaContact $instaContact;
  241.         return $this;
  242.     }
  243.     public function getWatsContact(): ?string
  244.     {
  245.         return $this->watsContact;
  246.     }
  247.     public function setWatsContact(string $watsContact): self
  248.     {
  249.         $this->watsContact $watsContact;
  250.         return $this;
  251.     }
  252.     public function getPhoneContact(): ?string
  253.     {
  254.         return $this->phoneContact;
  255.     }
  256.     public function setPhoneContact(string $phoneContact): self
  257.     {
  258.         $this->phoneContact $phoneContact;
  259.         return $this;
  260.     }
  261.     public function getTwitterContact(): ?string
  262.     {
  263.         return $this->twitterContact;
  264.     }
  265.     public function setTwitterContact(string $twitterContact): self
  266.     {
  267.         $this->twitterContact $twitterContact;
  268.         return $this;
  269.     }
  270.     /**
  271.      * @return Collection|SocialAdhesion[]
  272.      */
  273.     public function getSocialAdhesions(): Collection
  274.     {
  275.         return $this->socialAdhesions;
  276.     }
  277.     public function addSocialAdhesion(SocialAdhesion $socialAdhesion): self
  278.     {
  279.         if (!$this->socialAdhesions->contains($socialAdhesion)) {
  280.             $this->socialAdhesions[] = $socialAdhesion;
  281.             $socialAdhesion->setAdhesion($this);
  282.         }
  283.         return $this;
  284.     }
  285.     public function removeSocialAdhesion(SocialAdhesion $socialAdhesion): self
  286.     {
  287.         if ($this->socialAdhesions->removeElement($socialAdhesion)) {
  288.             // set the owning side to null (unless already changed)
  289.             if ($socialAdhesion->getAdhesion() === $this) {
  290.                 $socialAdhesion->setAdhesion(null);
  291.             }
  292.         }
  293.         return $this;
  294.     }
  295.     public function getValidateAt(): ?\DateTimeInterface
  296.     {
  297.         return $this->validateAt;
  298.     }
  299.     public function setValidateAt(\DateTimeInterface $validateAt): self
  300.     {
  301.         $this->validateAt $validateAt;
  302.         return $this;
  303.     }
  304.     public function getValidateBy(): ?SuperAdmin
  305.     {
  306.         return $this->validateBy;
  307.     }
  308.     public function setValidateBy(?SuperAdmin $validateBy): self
  309.     {
  310.         $this->validateBy $validateBy;
  311.         return $this;
  312.     }
  313. }