src/Entity/HtFile.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\MDS\EventsBundle\Entity\Proposal;
  4. use App\MDS\GreenPatioBundle\Entity\Reservation;
  5. use App\Repository\HtFileRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity(repositoryClass=HtFileRepository::class)
  11.  * @ORM\HasLifecycleCallbacks()
  12.  */
  13. class HtFile
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=Client::class)
  23.      */
  24.     private $client;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Proposal::class)
  27.      */
  28.     private $proposal;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=User::class)
  31.      * @ORM\JoinColumn(nullable=false)
  32.      */
  33.     private $createdId;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=User::class)
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $updatedId;
  39.     /**
  40.      * @ORM\Column(type="string", length=255)
  41.      */
  42.     private $title;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $status;
  47.     /**
  48.      * @ORM\Column(type="integer", nullable=true)
  49.      */
  50.     private $daysBlock;
  51.     /**
  52.      * @ORM\Column(type="integer", nullable=true)
  53.      */
  54.     private $pax;
  55.     /**
  56.      * @ORM\Column(type="text", nullable=true)
  57.      */
  58.     private $description;
  59.     /**
  60.      * @ORM\Column(type="text", nullable=true)
  61.      */
  62.     private $descriptionTwo;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      */
  66.     private $contactUnregistered;
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      */
  70.     private $nameContactUnregistered;
  71.     /**
  72.      * @ORM\Column(type="string", length=255, nullable=true)
  73.      */
  74.     private $phoneContactUnregistered;
  75.     /**
  76.      * @ORM\Column(type="datetime", nullable=true)
  77.      */
  78.     private $dateStart;
  79.     /**
  80.      * @ORM\Column(type="datetime", nullable=true)
  81.      */
  82.     private $dateEnd;
  83.     /**
  84.      * @ORM\Column(type="datetime_immutable")
  85.      */
  86.     private $createdAt;
  87.     /**
  88.      * @ORM\Column(type="datetime_immutable")
  89.      */
  90.     private $updatedAt;
  91.     /**
  92.      * @ORM\ManyToOne(targetEntity=ClientContact::class)
  93.      */
  94.     private $clientContact;
  95.     /**
  96.      * @ORM\OneToOne(targetEntity=Reservation::class, inversedBy="htFile", cascade={"persist", "remove"})
  97.      */
  98.     private $reservation;
  99.     /**
  100.      * @ORM\OneToMany(targetEntity=HtItem::class, mappedBy="htFile", orphanRemoval=true)
  101.      */
  102.     private $htItems;
  103.     /**
  104.      * @ORM\OneToMany(targetEntity=HtVisit::class, mappedBy="reservation")
  105.      */
  106.     private $htVisits;
  107.     public function __construct()
  108.     {
  109.         $this->htItems = new ArrayCollection();
  110.         $this->htVisits = new ArrayCollection();
  111.     }
  112.     public function getId(): ?int
  113.     {
  114.         return $this->id;
  115.     }
  116.     public function getClient(): ?Client
  117.     {
  118.         return $this->client;
  119.     }
  120.     public function setClient(?Client $client): self
  121.     {
  122.         $this->client $client;
  123.         return $this;
  124.     }
  125.     public function getProposal(): ?Proposal
  126.     {
  127.         return $this->proposal;
  128.     }
  129.     public function setProposal(?Proposal $proposal): self
  130.     {
  131.         $this->proposal $proposal;
  132.         return $this;
  133.     }
  134.     public function getCreatedId(): ?User
  135.     {
  136.         return $this->createdId;
  137.     }
  138.     public function setCreatedId(?User $createdId): self
  139.     {
  140.         $this->createdId $createdId;
  141.         return $this;
  142.     }
  143.     public function getUpdatedId(): ?User
  144.     {
  145.         return $this->updatedId;
  146.     }
  147.     public function setUpdatedId(?User $updatedId): self
  148.     {
  149.         $this->updatedId $updatedId;
  150.         return $this;
  151.     }
  152.     public function getTitle(): ?string
  153.     {
  154.         return $this->title;
  155.     }
  156.     public function setTitle(string $title): self
  157.     {
  158.         $this->title $title;
  159.         return $this;
  160.     }
  161.     public function getStatus(): ?string
  162.     {
  163.         return $this->status;
  164.     }
  165.     public function setStatus(?string $status): self
  166.     {
  167.         $this->status $status;
  168.         return $this;
  169.     }
  170.     public function getDaysBlock(): ?int
  171.     {
  172.         return $this->daysBlock;
  173.     }
  174.     public function setDaysBlock(?int $daysBlock): self
  175.     {
  176.         $this->daysBlock $daysBlock;
  177.         return $this;
  178.     }
  179.     public function getPax(): ?int
  180.     {
  181.         return $this->pax;
  182.     }
  183.     public function setPax(?int $pax): self
  184.     {
  185.         $this->pax $pax;
  186.         return $this;
  187.     }
  188.     public function getDescription(): ?string
  189.     {
  190.         return $this->description;
  191.     }
  192.     public function setDescription(?string $description): self
  193.     {
  194.         $this->description $description;
  195.         return $this;
  196.     }
  197.     public function getDescriptionTwo(): ?string
  198.     {
  199.         return $this->descriptionTwo;
  200.     }
  201.     public function setDescriptionTwo(?string $descriptionTwo): self
  202.     {
  203.         $this->descriptionTwo $descriptionTwo;
  204.         return $this;
  205.     }
  206.     public function getContactUnregistered(): ?string
  207.     {
  208.         return $this->contactUnregistered;
  209.     }
  210.     public function setContactUnregistered(?string $contactUnregistered): self
  211.     {
  212.         $this->contactUnregistered $contactUnregistered;
  213.         return $this;
  214.     }
  215.     public function getNameContactUnregistered(): ?string
  216.     {
  217.         return $this->nameContactUnregistered;
  218.     }
  219.     public function setNameContactUnregistered(?string $nameContactUnregistered): self
  220.     {
  221.         $this->nameContactUnregistered $nameContactUnregistered;
  222.         return $this;
  223.     }
  224.     public function getPhoneContactUnregistered(): ?string
  225.     {
  226.         return $this->phoneContactUnregistered;
  227.     }
  228.     public function setPhoneContactUnregistered(?string $phoneContactUnregistered): self
  229.     {
  230.         $this->phoneContactUnregistered $phoneContactUnregistered;
  231.         return $this;
  232.     }
  233.     public function getDateStart(): ?\DateTime
  234.     {
  235.         return $this->dateStart;
  236.     }
  237.     public function setDateStart(?\DateTime $dateStart): self
  238.     {
  239.         $this->dateStart $dateStart;
  240.         return $this;
  241.     }
  242.     public function getDateEnd(): ?\DateTime
  243.     {
  244.         return $this->dateEnd;
  245.     }
  246.     public function setDateEnd(?\DateTime $dateEnd): self
  247.     {
  248.         $this->dateEnd $dateEnd;
  249.         return $this;
  250.     }
  251.     public function getCreatedAt(): ?\DateTimeImmutable
  252.     {
  253.         return $this->createdAt;
  254.     }
  255.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  256.     {
  257.         $this->createdAt $createdAt;
  258.         return $this;
  259.     }
  260.     public function getUpdatedAt(): ?\DateTimeImmutable
  261.     {
  262.         return $this->updatedAt;
  263.     }
  264.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  265.     {
  266.         $this->updatedAt $updatedAt;
  267.         return $this;
  268.     }
  269.     /**
  270.      * @ORM\PrePersist
  271.      */
  272.     public function setCreatedAtValue()
  273.     {
  274.         $this->createdAt = new \DateTimeImmutable();
  275.     }
  276.     /**
  277.      * @ORM\PrePersist
  278.      * @ORM\PreUpdate
  279.      */
  280.     public function setUpdatedAtValue()
  281.     {
  282.         $this->updatedAt = new \DateTimeImmutable();
  283.     }
  284.     public function getClientContact(): ?ClientContact
  285.     {
  286.         return $this->clientContact;
  287.     }
  288.     public function setClientContact(?ClientContact $clientContact): self
  289.     {
  290.         $this->clientContact $clientContact;
  291.         return $this;
  292.     }
  293.     public function getReservation(): ?Reservation
  294.     {
  295.         return $this->reservation;
  296.     }
  297.     public function setReservation(?Reservation $reservation): self
  298.     {
  299.         $this->reservation $reservation;
  300.         return $this;
  301.     }
  302.     /**
  303.      * @return Collection<int, HtItem>
  304.      */
  305.     public function getHtItems(): Collection
  306.     {
  307.         return $this->htItems;
  308.     }
  309.     public function addHtItem(HtItem $htItem): self
  310.     {
  311.         if (!$this->htItems->contains($htItem)) {
  312.             $this->htItems[] = $htItem;
  313.             $htItem->setHtFile($this);
  314.         }
  315.         return $this;
  316.     }
  317.     public function removeHtItem(HtItem $htItem): self
  318.     {
  319.         if ($this->htItems->removeElement($htItem)) {
  320.             // set the owning side to null (unless already changed)
  321.             if ($htItem->getHtFile() === $this) {
  322.                 $htItem->setHtFile(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection<int, HtVisit>
  329.      */
  330.     public function getHtVisits(): Collection
  331.     {
  332.         return $this->htVisits;
  333.     }
  334.     public function addHtVisit(HtVisit $htVisit): self
  335.     {
  336.         if (!$this->htVisits->contains($htVisit)) {
  337.             $this->htVisits[] = $htVisit;
  338.             $htVisit->setReservation($this);
  339.         }
  340.         return $this;
  341.     }
  342.     public function removeHtVisit(HtVisit $htVisit): self
  343.     {
  344.         if ($this->htVisits->removeElement($htVisit)) {
  345.             // set the owning side to null (unless already changed)
  346.             if ($htVisit->getReservation() === $this) {
  347.                 $htVisit->setReservation(null);
  348.             }
  349.         }
  350.         return $this;
  351.     }
  352. }