src/Entity/Reclamation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\ReclamationRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity(repositoryClassReclamationRepository::class)]
  10. #[ApiResource]
  11. class Reclamation
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $titre null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $message null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $piecejointe null;
  23.     #[ORM\ManyToOne(inversedBy'reclamations')]
  24.     private ?User $user null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $date null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $de null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $vers null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $lu null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $refid null;
  35.     #[ORM\ManyToOne(inversedBy'reclamations')]
  36.     private ?Evenement $session null;
  37.     #[ORM\OneToMany(mappedBy'msg'targetEntityReponsereclamation::class,cascade: ['remove'])]
  38.     private Collection $reponsereclamations;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $lustagiaire null;
  41.     public function __construct()
  42.     {
  43.         $this->reponsereclamations = new ArrayCollection();
  44.     }
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getTitre(): ?string
  50.     {
  51.         return $this->titre;
  52.     }
  53.     public function setTitre(?string $titre): self
  54.     {
  55.         $this->titre $titre;
  56.         return $this;
  57.     }
  58.     public function getMessage(): ?string
  59.     {
  60.         return $this->message;
  61.     }
  62.     public function setMessage(?string $message): self
  63.     {
  64.         $this->message $message;
  65.         return $this;
  66.     }
  67.     public function getPiecejointe(): ?string
  68.     {
  69.         return $this->piecejointe;
  70.     }
  71.     public function setPiecejointe(?string $piecejointe): self
  72.     {
  73.         $this->piecejointe $piecejointe;
  74.         return $this;
  75.     }
  76.     public function getUser(): ?User
  77.     {
  78.         return $this->user;
  79.     }
  80.     public function setUser(?User $user): self
  81.     {
  82.         $this->user $user;
  83.         return $this;
  84.     }
  85.     public function getDate(): ?\DateTimeInterface
  86.     {
  87.         return $this->date;
  88.     }
  89.     public function setDate(?\DateTimeInterface $date): self
  90.     {
  91.         $this->date $date;
  92.         return $this;
  93.     }
  94.     public function getDe(): ?string
  95.     {
  96.         return $this->de;
  97.     }
  98.     public function setDe(?string $de): self
  99.     {
  100.         $this->de $de;
  101.         return $this;
  102.     }
  103.     public function getVers(): ?string
  104.     {
  105.         return $this->vers;
  106.     }
  107.     public function setVers(?string $vers): self
  108.     {
  109.         $this->vers $vers;
  110.         return $this;
  111.     }
  112.     public function getLu(): ?string
  113.     {
  114.         return $this->lu;
  115.     }
  116.     public function setLu(?string $lu): self
  117.     {
  118.         $this->lu $lu;
  119.         return $this;
  120.     }
  121.     /**
  122.      * @return string|null
  123.      */
  124.     public function getRefid(): ?string
  125.     {
  126.         return $this->refid;
  127.     }
  128.     /**
  129.      * @param string|null $refid
  130.      */
  131.     public function setRefid(?string $refid): void
  132.     {
  133.         $this->refid $refid;
  134.     }
  135.     public function getSession(): ?Evenement
  136.     {
  137.         return $this->session;
  138.     }
  139.     public function setSession(?Evenement $session): self
  140.     {
  141.         $this->session $session;
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return Collection<int, Reponsereclamation>
  146.      */
  147.     public function getReponsereclamations(): Collection
  148.     {
  149.         return $this->reponsereclamations;
  150.     }
  151.     public function addReponsereclamation(Reponsereclamation $reponsereclamation): self
  152.     {
  153.         if (!$this->reponsereclamations->contains($reponsereclamation)) {
  154.             $this->reponsereclamations->add($reponsereclamation);
  155.             $reponsereclamation->setMsg($this);
  156.         }
  157.         return $this;
  158.     }
  159.     public function removeReponsereclamation(Reponsereclamation $reponsereclamation): self
  160.     {
  161.         if ($this->reponsereclamations->removeElement($reponsereclamation)) {
  162.             // set the owning side to null (unless already changed)
  163.             if ($reponsereclamation->getMsg() === $this) {
  164.                 $reponsereclamation->setMsg(null);
  165.             }
  166.         }
  167.         return $this;
  168.     }
  169.     public function getLustagiaire(): ?string
  170.     {
  171.         return $this->lustagiaire;
  172.     }
  173.     public function setLustagiaire(?string $lustagiaire): self
  174.     {
  175.         $this->lustagiaire $lustagiaire;
  176.         return $this;
  177.     }
  178. }