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.     /**
  108.      * @ORM\Column(type="string", length=100, nullable=true)
  109.      */
  110.     private $clientType;
  111.     public function __construct()
  112.     {
  113.         $this->htItems = new ArrayCollection();
  114.         $this->htVisits = new ArrayCollection();
  115.     }
  116.     public function getId(): ?int
  117.     {
  118.         return $this->id;
  119.     }
  120.     public function getClient(): ?Client
  121.     {
  122.         return $this->client;
  123.     }
  124.     public function setClient(?Client $client): self
  125.     {
  126.         $this->client $client;
  127.         return $this;
  128.     }
  129.     public function getProposal(): ?Proposal
  130.     {
  131.         return $this->proposal;
  132.     }
  133.     public function setProposal(?Proposal $proposal): self
  134.     {
  135.         $this->proposal $proposal;
  136.         return $this;
  137.     }
  138.     public function getCreatedId(): ?User
  139.     {
  140.         return $this->createdId;
  141.     }
  142.     public function setCreatedId(?User $createdId): self
  143.     {
  144.         $this->createdId $createdId;
  145.         return $this;
  146.     }
  147.     public function getUpdatedId(): ?User
  148.     {
  149.         return $this->updatedId;
  150.     }
  151.     public function setUpdatedId(?User $updatedId): self
  152.     {
  153.         $this->updatedId $updatedId;
  154.         return $this;
  155.     }
  156.     public function getTitle(): ?string
  157.     {
  158.         return $this->title;
  159.     }
  160.     public function setTitle(string $title): self
  161.     {
  162.         $this->title $title;
  163.         return $this;
  164.     }
  165.     public function getStatus(): ?string
  166.     {
  167.         return $this->status;
  168.     }
  169.     public function setStatus(?string $status): self
  170.     {
  171.         $this->status $status;
  172.         return $this;
  173.     }
  174.     public function getDaysBlock(): ?int
  175.     {
  176.         return $this->daysBlock;
  177.     }
  178.     public function setDaysBlock(?int $daysBlock): self
  179.     {
  180.         $this->daysBlock $daysBlock;
  181.         return $this;
  182.     }
  183.     public function getPax(): ?int
  184.     {
  185.         return $this->pax;
  186.     }
  187.     public function setPax(?int $pax): self
  188.     {
  189.         $this->pax $pax;
  190.         return $this;
  191.     }
  192.     public function getDescription(): ?string
  193.     {
  194.         return $this->description;
  195.     }
  196.     public function setDescription(?string $description): self
  197.     {
  198.         $this->description $description;
  199.         return $this;
  200.     }
  201.     public function getDescriptionTwo(): ?string
  202.     {
  203.         return $this->descriptionTwo;
  204.     }
  205.     public function setDescriptionTwo(?string $descriptionTwo): self
  206.     {
  207.         $this->descriptionTwo $descriptionTwo;
  208.         return $this;
  209.     }
  210.     public function getContactUnregistered(): ?string
  211.     {
  212.         return $this->contactUnregistered;
  213.     }
  214.     public function setContactUnregistered(?string $contactUnregistered): self
  215.     {
  216.         $this->contactUnregistered $contactUnregistered;
  217.         return $this;
  218.     }
  219.     public function getNameContactUnregistered(): ?string
  220.     {
  221.         return $this->nameContactUnregistered;
  222.     }
  223.     public function setNameContactUnregistered(?string $nameContactUnregistered): self
  224.     {
  225.         $this->nameContactUnregistered $nameContactUnregistered;
  226.         return $this;
  227.     }
  228.     public function getPhoneContactUnregistered(): ?string
  229.     {
  230.         return $this->phoneContactUnregistered;
  231.     }
  232.     public function setPhoneContactUnregistered(?string $phoneContactUnregistered): self
  233.     {
  234.         $this->phoneContactUnregistered $phoneContactUnregistered;
  235.         return $this;
  236.     }
  237.     public function getDateStart(): ?\DateTime
  238.     {
  239.         return $this->dateStart;
  240.     }
  241.     public function setDateStart(?\DateTime $dateStart): self
  242.     {
  243.         $this->dateStart $dateStart;
  244.         return $this;
  245.     }
  246.     public function getDateEnd(): ?\DateTime
  247.     {
  248.         return $this->dateEnd;
  249.     }
  250.     public function setDateEnd(?\DateTime $dateEnd): self
  251.     {
  252.         $this->dateEnd $dateEnd;
  253.         return $this;
  254.     }
  255.     public function getCreatedAt(): ?\DateTimeImmutable
  256.     {
  257.         return $this->createdAt;
  258.     }
  259.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  260.     {
  261.         $this->createdAt $createdAt;
  262.         return $this;
  263.     }
  264.     public function getUpdatedAt(): ?\DateTimeImmutable
  265.     {
  266.         return $this->updatedAt;
  267.     }
  268.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  269.     {
  270.         $this->updatedAt $updatedAt;
  271.         return $this;
  272.     }
  273.     /**
  274.      * @ORM\PrePersist
  275.      */
  276.     public function setCreatedAtValue()
  277.     {
  278.         $this->createdAt = new \DateTimeImmutable();
  279.     }
  280.     /**
  281.      * @ORM\PrePersist
  282.      * @ORM\PreUpdate
  283.      */
  284.     public function setUpdatedAtValue()
  285.     {
  286.         $this->updatedAt = new \DateTimeImmutable();
  287.     }
  288.     public function getClientContact(): ?ClientContact
  289.     {
  290.         return $this->clientContact;
  291.     }
  292.     public function setClientContact(?ClientContact $clientContact): self
  293.     {
  294.         $this->clientContact $clientContact;
  295.         return $this;
  296.     }
  297.     public function getReservation(): ?Reservation
  298.     {
  299.         return $this->reservation;
  300.     }
  301.     public function setReservation(?Reservation $reservation): self
  302.     {
  303.         $this->reservation $reservation;
  304.         return $this;
  305.     }
  306.     /**
  307.      * @return Collection<int, HtItem>
  308.      */
  309.     public function getHtItems(): Collection
  310.     {
  311.         return $this->htItems;
  312.     }
  313.     public function addHtItem(HtItem $htItem): self
  314.     {
  315.         if (!$this->htItems->contains($htItem)) {
  316.             $this->htItems[] = $htItem;
  317.             $htItem->setHtFile($this);
  318.         }
  319.         return $this;
  320.     }
  321.     public function removeHtItem(HtItem $htItem): self
  322.     {
  323.         if ($this->htItems->removeElement($htItem)) {
  324.             // set the owning side to null (unless already changed)
  325.             if ($htItem->getHtFile() === $this) {
  326.                 $htItem->setHtFile(null);
  327.             }
  328.         }
  329.         return $this;
  330.     }
  331.     /**
  332.      * @return Collection<int, HtVisit>
  333.      */
  334.     public function getHtVisits(): Collection
  335.     {
  336.         return $this->htVisits;
  337.     }
  338.     public function addHtVisit(HtVisit $htVisit): self
  339.     {
  340.         if (!$this->htVisits->contains($htVisit)) {
  341.             $this->htVisits[] = $htVisit;
  342.             $htVisit->setReservation($this);
  343.         }
  344.         return $this;
  345.     }
  346.     public function removeHtVisit(HtVisit $htVisit): self
  347.     {
  348.         if ($this->htVisits->removeElement($htVisit)) {
  349.             // set the owning side to null (unless already changed)
  350.             if ($htVisit->getReservation() === $this) {
  351.                 $htVisit->setReservation(null);
  352.             }
  353.         }
  354.         return $this;
  355.     }
  356.     public function getClientType(): ?string
  357.     {
  358.         return $this->clientType;
  359.     }
  360.     public function setClientType(?string $clientType): self
  361.     {
  362.         $this->clientType $clientType;
  363.         return $this;
  364.     }
  365. }