src/Entity/SejourAttachment.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * SejourAttachment
  8.  *
  9.  * @ORM\Table(name="sejour_attachment", indexes={@ORM\Index(name="fk_attchment_idx", columns={"id_attchment"}), @ORM\Index(name="fk_sejour_idx", columns={"id_sejour"})})
  10.  * @ORM\Entity(repositoryClass="App\Repository\SejourAttachmentRepository")
  11.  */
  12. class SejourAttachment {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var \DateTime|null
  23.      *
  24.      * @ORM\Column(name="date_depot_attachement", type="datetime", nullable=true)
  25.      */
  26.     private $dateDepotAttachement;
  27.     /**
  28.      * @var string|null
  29.      *
  30.      * @ORM\Column(name="etat", type="string", length=45, nullable=true)
  31.      */
  32.     private $etat;
  33.     /**
  34.      * @var int|null
  35.      *
  36.      * @ORM\Column(name="nbconsomateurattch", type="integer", nullable=true)
  37.      */
  38.     private $nbconsomateurattch;
  39.     /**
  40.      * @var int|null
  41.      *
  42.      * @ORM\Column(name="nbpartenaireattch", type="integer", nullable=true)
  43.      */
  44.     private $nbpartenaireattch;
  45.     /**
  46.      * @var string|null
  47.      *
  48.      * @ORM\Column(name="nbecoleattch", type="string", length="128", nullable=true)
  49.      */
  50.     private $nbecoleattch;
  51.     /**
  52.      * @var \Attachment
  53.      *
  54.      * @ORM\ManyToOne(targetEntity="Attachment")
  55.      * @ORM\JoinColumns({
  56.      *   @ORM\JoinColumn(name="id_attchment", referencedColumnName="id")
  57.      * })
  58.      */
  59.     private $idAttchment;
  60.     /**
  61.      * @var \Sejour
  62.      *
  63.      * @ORM\ManyToOne(targetEntity="Sejour")
  64.      * @ORM\JoinColumns({
  65.      *   @ORM\JoinColumn(name="id_sejour", referencedColumnName="id")
  66.      * })
  67.      */
  68.     private $idSejour;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="sejourAttachments")
  71.      * @ORM\JoinColumns({
  72.      * @ORM\JoinColumn(name="idParent_id", referencedColumnName="id")
  73.      * })
  74.      */
  75.     private $idParent;
  76.     /**
  77.      * @ORM\Column(type="string", length=255, nullable=true)
  78.      */
  79.     private $statut;
  80.     /**
  81.      * @ORM\OneToMany(targetEntity="App\Entity\Photonsumeriques", mappedBy="idSejourAttachement")
  82.      */
  83.     private $photonsumeriques;
  84.     public function __construct()
  85.     {
  86.         $this->photonsumeriques = new ArrayCollection();
  87.     }
  88.     public function getId(): ?int {
  89.         return $this->id;
  90.     }
  91.     public function getDateDepotAttachement(): ?\DateTimeInterface {
  92.         return $this->dateDepotAttachement;
  93.     }
  94.     public function setDateDepotAttachement(?\DateTimeInterface $dateDepotAttachement): self {
  95.         $this->dateDepotAttachement $dateDepotAttachement;
  96.         return $this;
  97.     }
  98.     public function getEtat(): ?string {
  99.         return $this->etat;
  100.     }
  101.     public function setEtat(?string $etat): self {
  102.         $this->etat $etat;
  103.         return $this;
  104.     }
  105.     public function getIdAttchment(): ?Attachment {
  106.         return $this->idAttchment;
  107.     }
  108.     public function setIdAttchment(?Attachment $idAttchment): self {
  109.         $this->idAttchment $idAttchment;
  110.         return $this;
  111.     }
  112.     public function getIdSejour(): ?Sejour {
  113.         return $this->idSejour;
  114.     }
  115.     public function setIdSejour(?Sejour $idSejour): self {
  116.         $this->idSejour $idSejour;
  117.         return $this;
  118.     }
  119.     public function getNbconsomateurattch(): ?int {
  120.         return $this->nbconsomateurattch;
  121.     }
  122.     public function setNbconsomateurattch(?int $nbconsomateurattch): self {
  123.         $this->nbconsomateurattch $nbconsomateurattch;
  124.         return $this;
  125.     }
  126.     public function getNbpartenaireattch(): ?int {
  127.         return $this->nbpartenaireattch;
  128.     }
  129.     public function setNbpartenaireattch(?int $nbpartenaireattch): self {
  130.         $this->nbpartenaireattch $nbpartenaireattch;
  131.         return $this;
  132.     }
  133.     public function getNbecoleattch(): ?string {
  134.         return $this->nbecoleattch;
  135.     }
  136.     public function setNbecoleattch(?string $nbecoleattch): self {
  137.         $this->nbecoleattch $nbecoleattch;
  138.         return $this;
  139.     }
  140.     public function getIdParent(): ?User
  141.     {
  142.         return $this->idParent;
  143.     }
  144.     public function setIdParent(?User $idParent): self
  145.     {
  146.         $this->idParent $idParent;
  147.         return $this;
  148.     }
  149.     public function getStatut(): ?string
  150.     {
  151.         return $this->statut;
  152.     }
  153.     public function setStatut(?string $statut): self
  154.     {
  155.         $this->statut $statut;
  156.         return $this;
  157.     }
  158.     /**
  159.      * @return Collection|Photonsumeriques[]
  160.      */
  161.     public function getPhotonsumeriques(): Collection
  162.     {
  163.         return $this->photonsumeriques;
  164.     }
  165.     public function addPhotonsumerique(Photonsumeriques $photonsumerique): self
  166.     {
  167.         if (!$this->photonsumeriques->contains($photonsumerique)) {
  168.             $this->photonsumeriques[] = $photonsumerique;
  169.             $photonsumerique->setIdSejourAttachement($this);
  170.         }
  171.         return $this;
  172.     }
  173.     public function removePhotonsumerique(Photonsumeriques $photonsumerique): self
  174.     {
  175.         if ($this->photonsumeriques->contains($photonsumerique)) {
  176.             $this->photonsumeriques->removeElement($photonsumerique);
  177.             // set the owning side to null (unless already changed)
  178.             if ($photonsumerique->getIdSejourAttachement() === $this) {
  179.                 $photonsumerique->setIdSejourAttachement(null);
  180.             }
  181.         }
  182.         return $this;
  183.     }
  184. }