src/Entity/Agora.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AgoraRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Uid\Uuid;
  8. /**
  9.  * @ORM\Entity(repositoryClass=AgoraRepository::class)
  10.  */
  11. class Agora
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      */
  22.     private $uuid;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $token;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $slug;
  31.     /**
  32.      * @ORM\Column(type="boolean", nullable=true)
  33.      */
  34.     private $statut false;
  35.     /**
  36.      * @ORM\Column(type="datetime_immutable", nullable=true)
  37.      */
  38.     private $createdAt;
  39.     /**
  40.      * @ORM\Column(type="datetime", nullable=true)
  41.      */
  42.     private $updatedAt;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $nom;
  47.     /**
  48.      * @ORM\Column(type="text", nullable=true)
  49.      */
  50.     private $description;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=Categorie::class, inversedBy="agoras")
  53.      */
  54.     private $categorie;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity=Souscategorie::class, inversedBy="agoras")
  57.      */
  58.     private $souscategorie;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $pseudo;
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="agoras")
  65.      */
  66.     private $user;
  67.     /**
  68.      * @ORM\Column(type="datetime_immutable", nullable=true)
  69.      */
  70.     private $validedAt;
  71.     /**
  72.      * @ORM\Column(type="boolean", nullable=true)
  73.      */
  74.     private $moderate false;
  75.     /**
  76.      * @ORM\Column(type="string", length=255, nullable=true)
  77.      */
  78.     private $titre;
  79.     /**
  80.      * @ORM\Column(type="string", length=255, nullable=true)
  81.      */
  82.     private $prenom;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $email;
  87.     /**
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $phone;
  91.     /**
  92.      * @ORM\ManyToOne(targetEntity=Direction::class, inversedBy="agoras")
  93.      */
  94.     private $direction;
  95.     /**
  96.      * @ORM\ManyToOne(targetEntity=Grade::class, inversedBy="agoras")
  97.      */
  98.     private $grade;
  99.     /**
  100.      * @ORM\Column(type="boolean", nullable=true)
  101.      */
  102.     private $fake;
  103.     /**
  104.      * @ORM\OneToMany(targetEntity=FichierAgora::class, mappedBy="agora")
  105.      */
  106.     private $fichierAgoras;
  107.     /**
  108.      * @ORM\Column(type="string", length=255, nullable=true)
  109.      */
  110.     private $entite;
  111.     /**
  112.      * @ORM\Column(type="string", length=255, nullable=true)
  113.      */
  114.     private $genre;
  115.     /**
  116.      * @ORM\Column(type="string", length=255, nullable=true)
  117.      */
  118.     private $fichier;
  119.     /**
  120.      * @ORM\Column(type="string", length=255, nullable=true)
  121.      */
  122.     private $ext;
  123.     /**
  124.      * @ORM\Column(type="string", length=255, nullable=true)
  125.      */
  126.     private $mime;
  127.     /**
  128.      * @ORM\OneToMany(targetEntity=Conversation::class, mappedBy="agora")
  129.      */
  130.     private $conversations;
  131.     public function __construct()
  132.     {
  133.         $this->uuid Uuid::v4();
  134.         $this->fichierAgoras = new ArrayCollection();
  135.         $this->conversations = new ArrayCollection();
  136.     }
  137.     public function getId(): ?int
  138.     {
  139.         return $this->id;
  140.     }
  141.     public function getUuid(): ?string
  142.     {
  143.         return $this->uuid;
  144.     }
  145.     public function setUuid(?string $uuid): self
  146.     {
  147.         $this->uuid $uuid;
  148.         return $this;
  149.     }
  150.     public function getToken(): ?string
  151.     {
  152.         return $this->token;
  153.     }
  154.     public function setToken(?string $token): self
  155.     {
  156.         $this->token $token;
  157.         return $this;
  158.     }
  159.     public function getSlug(): ?string
  160.     {
  161.         return $this->slug;
  162.     }
  163.     public function setSlug(?string $slug): self
  164.     {
  165.         $this->slug $slug;
  166.         return $this;
  167.     }
  168.     public function isStatut(): ?bool
  169.     {
  170.         return $this->statut;
  171.     }
  172.     public function setStatut(?bool $statut): self
  173.     {
  174.         $this->statut $statut;
  175.         return $this;
  176.     }
  177.     public function getCreatedAt(): ?\DateTimeImmutable
  178.     {
  179.         return $this->createdAt;
  180.     }
  181.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  182.     {
  183.         $this->createdAt $createdAt;
  184.         return $this;
  185.     }
  186.     public function getUpdatedAt(): ?\DateTimeInterface
  187.     {
  188.         return $this->updatedAt;
  189.     }
  190.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  191.     {
  192.         $this->updatedAt $updatedAt;
  193.         return $this;
  194.     }
  195.     public function getNom(): ?string
  196.     {
  197.         return $this->nom;
  198.     }
  199.     public function setNom(?string $nom): self
  200.     {
  201.         $this->nom $nom;
  202.         return $this;
  203.     }
  204.     public function getDescription(): ?string
  205.     {
  206.         return $this->description;
  207.     }
  208.     public function setDescription(?string $description): self
  209.     {
  210.         $this->description $description;
  211.         return $this;
  212.     }
  213.     public function getCategorie(): ?Categorie
  214.     {
  215.         return $this->categorie;
  216.     }
  217.     public function setCategorie(?Categorie $categorie): self
  218.     {
  219.         $this->categorie $categorie;
  220.         return $this;
  221.     }
  222.     public function getSouscategorie(): ?Souscategorie
  223.     {
  224.         return $this->souscategorie;
  225.     }
  226.     public function setSouscategorie(?Souscategorie $souscategorie): self
  227.     {
  228.         $this->souscategorie $souscategorie;
  229.         return $this;
  230.     }
  231.     public function getPseudo(): ?string
  232.     {
  233.         return $this->pseudo;
  234.     }
  235.     public function setPseudo(?string $pseudo): self
  236.     {
  237.         $this->pseudo $pseudo;
  238.         return $this;
  239.     }
  240.     public function getUser(): ?User
  241.     {
  242.         return $this->user;
  243.     }
  244.     public function setUser(?User $user): self
  245.     {
  246.         $this->user $user;
  247.         return $this;
  248.     }
  249.     public function getValidedAt(): ?\DateTimeImmutable
  250.     {
  251.         return $this->validedAt;
  252.     }
  253.     public function setValidedAt(?\DateTimeImmutable $validedAt): self
  254.     {
  255.         $this->validedAt $validedAt;
  256.         return $this;
  257.     }
  258.     public function isModerate(): ?bool
  259.     {
  260.         return $this->moderate;
  261.     }
  262.     public function setModerate(?bool $moderate): self
  263.     {
  264.         $this->moderate $moderate;
  265.         return $this;
  266.     }
  267.     public function getTitre(): ?string
  268.     {
  269.         return $this->titre;
  270.     }
  271.     public function setTitre(?string $titre): self
  272.     {
  273.         $this->titre $titre;
  274.         return $this;
  275.     }
  276.     public function getPrenom(): ?string
  277.     {
  278.         return $this->prenom;
  279.     }
  280.     public function setPrenom(?string $prenom): self
  281.     {
  282.         $this->prenom $prenom;
  283.         return $this;
  284.     }
  285.     public function getEmail(): ?string
  286.     {
  287.         return $this->email;
  288.     }
  289.     public function setEmail(?string $email): self
  290.     {
  291.         $this->email $email;
  292.         return $this;
  293.     }
  294.     public function getPhone(): ?string
  295.     {
  296.         return $this->phone;
  297.     }
  298.     public function setPhone(?string $phone): self
  299.     {
  300.         $this->phone $phone;
  301.         return $this;
  302.     }
  303.     public function getDirection(): ?Direction
  304.     {
  305.         return $this->direction;
  306.     }
  307.     public function setDirection(?Direction $direction): self
  308.     {
  309.         $this->direction $direction;
  310.         return $this;
  311.     }
  312.     public function getGrade(): ?Grade
  313.     {
  314.         return $this->grade;
  315.     }
  316.     public function setGrade(?Grade $grade): self
  317.     {
  318.         $this->grade $grade;
  319.         return $this;
  320.     }
  321.     public function isFake(): ?bool
  322.     {
  323.         return $this->fake;
  324.     }
  325.     public function setFake(?bool $fake): self
  326.     {
  327.         $this->fake $fake;
  328.         return $this;
  329.     }
  330.     /**
  331.      * @return Collection<int, FichierAgora>
  332.      */
  333.     public function getFichierAgoras(): Collection
  334.     {
  335.         return $this->fichierAgoras;
  336.     }
  337.     public function addFichierAgora(FichierAgora $fichierAgora): self
  338.     {
  339.         if (!$this->fichierAgoras->contains($fichierAgora)) {
  340.             $this->fichierAgoras[] = $fichierAgora;
  341.             $fichierAgora->setAgora($this);
  342.         }
  343.         return $this;
  344.     }
  345.     public function removeFichierAgora(FichierAgora $fichierAgora): self
  346.     {
  347.         if ($this->fichierAgoras->removeElement($fichierAgora)) {
  348.             // set the owning side to null (unless already changed)
  349.             if ($fichierAgora->getAgora() === $this) {
  350.                 $fichierAgora->setAgora(null);
  351.             }
  352.         }
  353.         return $this;
  354.     }
  355.     public function getEntite(): ?string
  356.     {
  357.         return $this->entite;
  358.     }
  359.     public function setEntite(?string $entite): self
  360.     {
  361.         $this->entite $entite;
  362.         return $this;
  363.     }
  364.     public function getGenre(): ?string
  365.     {
  366.         return $this->genre;
  367.     }
  368.     public function setGenre(?string $genre): self
  369.     {
  370.         $this->genre $genre;
  371.         return $this;
  372.     }
  373.     public function getFichier(): ?string
  374.     {
  375.         return $this->fichier;
  376.     }
  377.     public function setFichier(?string $fichier): self
  378.     {
  379.         $this->fichier $fichier;
  380.         return $this;
  381.     }
  382.     public function getExt(): ?string
  383.     {
  384.         return $this->ext;
  385.     }
  386.     public function setExt(?string $ext): self
  387.     {
  388.         $this->ext $ext;
  389.         return $this;
  390.     }
  391.     public function getMime(): ?string
  392.     {
  393.         return $this->mime;
  394.     }
  395.     public function setMime(?string $mime): self
  396.     {
  397.         $this->mime $mime;
  398.         return $this;
  399.     }
  400.     /**
  401.      * @return Collection<int, Conversation>
  402.      */
  403.     public function getConversations(): Collection
  404.     {
  405.         return $this->conversations;
  406.     }
  407.     public function addConversation(Conversation $conversation): self
  408.     {
  409.         if (!$this->conversations->contains($conversation)) {
  410.             $this->conversations[] = $conversation;
  411.             $conversation->setAgora($this);
  412.         }
  413.         return $this;
  414.     }
  415.     public function removeConversation(Conversation $conversation): self
  416.     {
  417.         if ($this->conversations->removeElement($conversation)) {
  418.             // set the owning side to null (unless already changed)
  419.             if ($conversation->getAgora() === $this) {
  420.                 $conversation->setAgora(null);
  421.             }
  422.         }
  423.         return $this;
  424.     }
  425. }