src/Entity/Messageinscrit.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\MessageinscritRepository;
  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(repositoryClassMessageinscritRepository::class)]
  10. #[ApiResource]
  11. class Messageinscrit
  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'messageinscrits')]
  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\OneToMany(mappedBy'msg'targetEntityReponsemessage::class,cascade: ['remove'])]
  34.     private Collection $reponsemessages;
  35.     #[ORM\Column(length255nullabletrue)]
  36.     private ?string $refid null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $lustagiaire null;
  39.     #[ORM\Column(length255nullabletrue)]
  40.     private ?string $luformateur null;
  41.     public function __construct()
  42.     {
  43.         $this->reponsemessages = 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 Collection<int, Reponsemessage>
  123.      */
  124.     public function getReponsemessages(): Collection
  125.     {
  126.         return $this->reponsemessages;
  127.     }
  128.     public function addReponsemessage(Reponsemessage $reponsemessage): self
  129.     {
  130.         if (!$this->reponsemessages->contains($reponsemessage)) {
  131.             $this->reponsemessages->add($reponsemessage);
  132.             $reponsemessage->setMsg($this);
  133.         }
  134.         return $this;
  135.     }
  136.     public function removeReponsemessage(Reponsemessage $reponsemessage): self
  137.     {
  138.         if ($this->reponsemessages->removeElement($reponsemessage)) {
  139.             // set the owning side to null (unless already changed)
  140.             if ($reponsemessage->getMsg() === $this) {
  141.                 $reponsemessage->setMsg(null);
  142.             }
  143.         }
  144.         return $this;
  145.     }
  146.     public function getRefid(): ?string
  147.     {
  148.         return $this->refid;
  149.     }
  150.     public function setRefid(?string $refid): self
  151.     {
  152.         $this->refid $refid;
  153.         return $this;
  154.     }
  155.     public function getLustagiaire(): ?string
  156.     {
  157.         return $this->lustagiaire;
  158.     }
  159.     public function setLustagiaire(?string $lustagiaire): self
  160.     {
  161.         $this->lustagiaire $lustagiaire;
  162.         return $this;
  163.     }
  164.     public function __toString(): string
  165.     {
  166.         return $this->getId() ?: $this->getId() ?: 'Untitled Support';
  167.     }
  168.     public function getLuformateur(): ?string
  169.     {
  170.         return $this->luformateur;
  171.     }
  172.     public function setLuformateur(?string $luformateur): self
  173.     {
  174.         $this->luformateur $luformateur;
  175.         return $this;
  176.     }
  177. }