<?php

namespace App\Entity;

use App\Repository\TourRequestRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;

/**
 * @ORM\Entity(repositoryClass=TourRequestRepository::class)
 */
class TourRequest
{
    public const NUM_ITEMS = 15;

    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity=ExpenseType::class, inversedBy="TourRequest")
     * @ORM\JoinColumn(nullable=false)
     */
    private $expenseType;

    /**
     * @ORM\ManyToOne(targetEntity=ExpensePurpose::class, inversedBy="TourRequest")
     * @ORM\JoinColumn(nullable=false)
     */
    private $expensePurpose;

    /**
     * @ORM\Column(type="date")
     */
    private $submitionDate;

    /**
     * @ORM\Column(type="string", length=50)
     */
    private $tourScope;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $placeVisit;

    /**
     * @ORM\Column(type="string", length=555)
     */
    private $expectVisit;

    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    private $startingDate;

    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    private $endingDate;

    /**
     * @ORM\Column(type="string", length=55)
     */
    private $contactPhone;

    /**
     * @ORM\Column(type="string", length=855)
     */
    private $contactAddress;

    /**
     * @ORM\Column(type="string", length=85)
     */
    private $transportationMode;

    /**
     * @ORM\Column(type="string", length=2000)
     */
    private $tourPurpose;

    /**
     * @ORM\Column(type="string", length=2000, nullable=true)
     */
    private $officialDuties;

    /**
     * @ORM\Column(type="string", length=85, nullable=true)
     */
    private $advanceCurrency;

    /**
     * @ORM\Column(type="float", nullable=true)
     */
    private $advanceAmount;
    
    /**
     * @ORM\OneToMany(targetEntity=TourClaim::class, mappedBy="tourRequest")
     */
    private $tourClaims;

    /**
     * @ORM\ManyToOne(targetEntity=User::class, inversedBy="TourRequest")
     * @ORM\JoinColumn(nullable=false)
     */
    private $user;

     /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $fhApproval;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $fhApprovalBy;

    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    private $fhApprovalDate;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $dhApproval;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $dhApprovalBy;

    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    private $dhApprovalDate;

      /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $ceoApproval;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $ceoApprovalBy;

    /**
     * @ORM\Column(type="datetime", nullable=true)
     */
    private $ceoApprovalDate;

    public function __construct()
    {
        $this->tourClaims = new ArrayCollection();
    }

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getExpenseType(): ?ExpenseType
    {
        return $this->expenseType;
    }

    public function setExpenseType(?ExpenseType $expenseType): self
    {
        $this->expenseType = $expenseType;

        return $this;
    }

    public function getExpensePurpose(): ?ExpensePurpose
    {
        return $this->expensePurpose;
    }

    public function setExpensePurpose(?ExpensePurpose $expensePurpose): self
    {
        $this->expensePurpose = $expensePurpose;

        return $this;
    }

    public function getSubmitionDate(): ?\DateTimeInterface
    {
        return $this->submitionDate;
    }

    public function setSubmitionDate(\DateTimeInterface $submitionDate): self
    {
        $this->submitionDate = $submitionDate;

        return $this;
    }

    public function getTourScope(): ?string
    {
        return $this->tourScope;
    }

    public function setTourScope(string $tourScope): self
    {
        $this->tourScope = $tourScope;

        return $this;
    }

    public function getPlaceVisit(): ?string
    {
        return $this->placeVisit;
    }

    public function setPlaceVisit(string $placeVisit): self
    {
        $this->placeVisit = $placeVisit;

        return $this;
    }

    public function getExpectVisit(): ?string
    {
        return $this->expectVisit;
    }

    public function setExpectVisit(string $expectVisit): self
    {
        $this->expectVisit = $expectVisit;

        return $this;
    }

    public function getStartingDate(): ?\DateTimeInterface
    {
        return $this->startingDate;
    }

    public function setStartingDate(?\DateTimeInterface $startingDate): self
    {
        $this->startingDate = $startingDate;

        return $this;
    }

    public function getEndingDate(): ?\DateTimeInterface
    {
        return $this->endingDate;
    }

    public function setEndingDate(?\DateTimeInterface $endingDate): self
    {
        $this->endingDate = $endingDate;

        return $this;
    }

    public function getContactPhone(): ?string
    {
        return $this->contactPhone;
    }

    public function setContactPhone(string $contactPhone): self
    {
        $this->contactPhone = $contactPhone;

        return $this;
    }

    public function getContactAddress(): ?string
    {
        return $this->contactAddress;
    }

    public function setContactAddress(string $contactAddress): self
    {
        $this->contactAddress = $contactAddress;

        return $this;
    }

    public function getTransportationMode(): ?string
    {
        return $this->transportationMode;
    }

    public function setTransportationMode(string $transportationMode): self
    {
        $this->transportationMode = $transportationMode;

        return $this;
    }

    public function getTourPurpose(): ?string
    {
        return $this->tourPurpose;
    }

    public function setTourPurpose(string $tourPurpose): self
    {
        $this->tourPurpose = $tourPurpose;

        return $this;
    }

    public function getOfficialDuties(): ?string
    {
        return $this->officialDuties;
    }

    public function setOfficialDuties(?string $officialDuties): self
    {
        $this->officialDuties = $officialDuties;

        return $this;
    }

    public function getAdvanceCurrency(): ?string
    {
        return $this->advanceCurrency;
    }

    public function setAdvanceCurrency(?string $advanceCurrency): self
    {
        $this->advanceCurrency = $advanceCurrency;

        return $this;
    }

    public function getAdvanceAmount(): ?float
    {
        return $this->advanceAmount;
    }

    public function setAdvanceAmount(?float $advanceAmount): self
    {
        $this->advanceAmount = $advanceAmount;

        return $this;
    }

    /**
     * @return Collection|TourClaim[]
     */
    public function getTourClaims(): Collection
    {
        return $this->tourClaims;
    }

    public function addTourClaim(TourClaim $tourClaim): self
    {
        if (!$this->tourClaims->contains($tourClaim)) {
            $this->tourClaims[] = $tourClaim;
            $tourClaim->setTourRequest($this);
        }

        return $this;
    }

    public function removeTourClaim(TourClaim $tourClaim): self
    {
        if ($this->tourClaims->removeElement($tourClaim)) {
            // set the owning side to null (unless already changed)
            if ($tourClaim->getTourRequest() === $this) {
                $tourClaim->setTourRequest(null);
            }
        }

        return $this;
    }

    public function getUser(): ?User
    {
        return $this->user;
    }

    public function setUser(?User $user): self
    {
        $this->user = $user;

        return $this;
    }

    public function getFhApproval(): ?int
    {
        return $this->fhApproval;
    }

    public function setFhApproval(?int $fhApproval): self
    {
        $this->fhApproval = $fhApproval;

        return $this;
    }

    public function getFhApprovalBy(): ?int
    {
        return $this->fhApprovalBy;
    }

    public function setFhApprovalBy(?int $fhApprovalBy): self
    {
        $this->fhApprovalBy = $fhApprovalBy;

        return $this;
    }

    public function getFhApprovalDate(): ?\DateTimeInterface
    {
        return $this->fhApprovalDate;
    }

    public function setFhApprovalDate(?\DateTimeInterface $fhApprovalDate): self
    {
        $this->fhApprovalDate = $fhApprovalDate;

        return $this;
    }

    public function getDhApproval(): ?int
    {
        return $this->dhApproval;
    }

    public function setDhApproval(?int $dhApproval): self
    {
        $this->dhApproval = $dhApproval;

        return $this;
    }

    public function getDhApprovalBy(): ?int
    {
        return $this->dhApprovalBy;
    }

    public function setDhApprovalBy(?int $dhApprovalBy): self
    {
        $this->dhApprovalBy = $dhApprovalBy;

        return $this;
    }

    public function getDhApprovalDate(): ?\DateTimeInterface
    {
        return $this->dhApprovalDate;
    }

    public function setDhApprovalDate(?\DateTimeInterface $dhApprovalDate): self
    {
        $this->dhApprovalDate = $dhApprovalDate;

        return $this;
    }

    public function getCeoApproval(): ?int
    {
        return $this->ceoApproval;
    }

    public function setCeoApproval(?int $ceoApproval): self
    {
        $this->ceoApproval = $ceoApproval;

        return $this;
    }

    public function getCeoApprovalBy(): ?int
    {
        return $this->ceoApprovalBy;
    }

    public function setCeoApprovalBy(?int $ceoApprovalBy): self
    {
        $this->ceoApprovalBy = $ceoApprovalBy;

        return $this;
    }

    public function getCeoApprovalDate(): ?\DateTimeInterface
    {
        return $this->ceoApprovalDate;
    }

    public function setCeoApprovalDate(?\DateTimeInterface $ceoApprovalDate): self
    {
        $this->ceoApprovalDate = $ceoApprovalDate;

        return $this;
    }


}
