src/Entity/Documentation/MasterGuide.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Documentation;
  3. use App\Entity\Airline;
  4. use App\Entity\Airplane;
  5. use App\Entity\AppUser;
  6. use App\Entity\Consignee;
  7. use App\Repository\Documentation\MasterGuideRepository;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @ORM\Entity(repositoryClass=MasterGuideRepository::class)
  13.  * @ORM\Table(name="documentation_master_guide")
  14.  */
  15. class MasterGuide
  16. {
  17.     /**
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity=Airline::class, inversedBy="masterGuides")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $airline;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Airplane::class, inversedBy="masterGuides")
  30.      */
  31.     private $airplane;
  32.     /**
  33.      * @ORM\Column(type="string", length=1024, nullable=true)
  34.      */
  35.     private $departureAirport;
  36.     /**
  37.      * @ORM\Column(type="string", length=1024, nullable=true)
  38.      */
  39.     private $arrivalAirport;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $destinationAirportCode;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $chargeFinalDestination;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $paymentType;
  52.     /**
  53.      * @ORM\Column(type="float", nullable=true)
  54.      */
  55.     private $carrierValueDeclared;
  56.     /**
  57.      * @ORM\Column(type="float", nullable=true)
  58.      */
  59.     private $customsValueDeclared;
  60.     /**
  61.      * @ORM\Column(type="float", nullable=true)
  62.      */
  63.     private $prepaidWeightValue;
  64.     /**
  65.      * @ORM\Column(type="float", nullable=true)
  66.      */
  67.     private $collectWeightValue;
  68.     /**
  69.      * @ORM\Column(type="float", nullable=true)
  70.      */
  71.     private $prepaidValuationValue;
  72.     /**
  73.      * @ORM\Column(type="float", nullable=true)
  74.      */
  75.     private $collectValuationValue;
  76.     /**
  77.      * @ORM\Column(type="float", nullable=true)
  78.      */
  79.     private $prepaidTaxValue;
  80.     /**
  81.      * @ORM\Column(type="float", nullable=true)
  82.      */
  83.     private $collectTaxValue;
  84.     /**
  85.      * @ORM\Column(type="float", nullable=true)
  86.      */
  87.     private $prepaidOtherChargesToAgent;
  88.     /**
  89.      * @ORM\Column(type="float", nullable=true)
  90.      */
  91.     private $collectOtherChargesToAgent;
  92.     /**
  93.      * @ORM\Column(type="float", nullable=true)
  94.      */
  95.     private $prepaidOtherChargesToCarrier;
  96.     /**
  97.      * @ORM\Column(type="float", nullable=true)
  98.      */
  99.     private $collectOtherChargesToCarrier;
  100.     /**
  101.      * @ORM\Column(type="datetime", nullable=true)
  102.      */
  103.     private $departureDate;
  104.     /**
  105.      * @ORM\Column(type="string", length=255, nullable=true)
  106.      */
  107.     private $flightNumber;
  108.     /**
  109.      * @ORM\Column(type="text", nullable=true)
  110.      */
  111.     private $handlingInformation;
  112.     /**
  113.      * @ORM\ManyToOne(targetEntity=MasterGuideNumber::class, inversedBy="masterGuides")
  114.      */
  115.     private $number;
  116.     /**
  117.      * @ORM\Column(type="datetime_immutable")
  118.      */
  119.     private $generatedAt;
  120.     /**
  121.      * @ORM\ManyToOne(targetEntity=AppUser::class, inversedBy="masterGuides")
  122.      * @ORM\JoinColumn(nullable=false)
  123.      */
  124.     private $generatedBy;
  125.     /**
  126.      * @ORM\OneToMany(targetEntity=HouseGuide::class, mappedBy="masterGuide")
  127.      */
  128.     private $houseGuides;
  129.     /**
  130.      * @ORM\OneToOne(targetEntity=CargoManifest::class, mappedBy="masterGuide", cascade={"persist", "remove"})
  131.      */
  132.     private $cargoManifest;
  133.     /**
  134.      * @ORM\OneToMany(targetEntity=MasterGuideHouseInfo::class, mappedBy="masterGuide")
  135.      */
  136.     private $masterGuideHouseInfos;
  137.     /**
  138.      * @ORM\Column(type="boolean")
  139.      */
  140.     private $isComplete;
  141.     /**
  142.      * @ORM\ManyToOne(targetEntity=Consignee::class, inversedBy="masterGuides")
  143.      * @ORM\JoinColumn(nullable=false)
  144.      */
  145.     private $consignee;
  146.     /**
  147.      * @ORM\Column(type="text", nullable=true)
  148.      */
  149.     private $accountingInfo;
  150.     /**
  151.      * @ORM\Column(type="string", length=255, nullable=true)
  152.      */
  153.     private $airportDepartureCode;
  154.     public function __construct()
  155.     {
  156.         $this->houseGuides = new ArrayCollection();
  157.         $this->masterGuideHouseInfos = new ArrayCollection();
  158.         $this->isComplete false;
  159.     }
  160.     public function getId(): ?int
  161.     {
  162.         return $this->id;
  163.     }
  164.     public function getAirline(): ?Airline
  165.     {
  166.         return $this->airline;
  167.     }
  168.     public function setAirline(?Airline $airline): self
  169.     {
  170.         $this->airline $airline;
  171.         return $this;
  172.     }
  173.     public function getAirplane(): ?Airplane
  174.     {
  175.         return $this->airplane;
  176.     }
  177.     public function setAirplane(?Airplane $airplane): self
  178.     {
  179.         $this->airplane $airplane;
  180.         return $this;
  181.     }
  182.     public function getDepartureAirport(): ?string
  183.     {
  184.         return $this->departureAirport;
  185.     }
  186.     public function setDepartureAirport(?string $departureAirport): self
  187.     {
  188.         $this->departureAirport $departureAirport;
  189.         return $this;
  190.     }
  191.     public function getArrivalAirport(): ?string
  192.     {
  193.         return $this->arrivalAirport;
  194.     }
  195.     public function setArrivalAirport(?string $arrivalAirport): self
  196.     {
  197.         $this->arrivalAirport $arrivalAirport;
  198.         return $this;
  199.     }
  200.     public function getDestinationAirportCode(): ?string
  201.     {
  202.         return $this->destinationAirportCode;
  203.     }
  204.     public function setDestinationAirportCode(?string $destinationAirportCode): self
  205.     {
  206.         $this->destinationAirportCode $destinationAirportCode;
  207.         return $this;
  208.     }
  209.     public function getChargeFinalDestination(): ?string
  210.     {
  211.         return $this->chargeFinalDestination;
  212.     }
  213.     public function setChargeFinalDestination(?string $chargeFinalDestination): self
  214.     {
  215.         $this->chargeFinalDestination $chargeFinalDestination;
  216.         return $this;
  217.     }
  218.     public function getPaymentType(): ?string
  219.     {
  220.         return $this->paymentType;
  221.     }
  222.     public function setPaymentType(?string $paymentType): self
  223.     {
  224.         $this->paymentType $paymentType;
  225.         return $this;
  226.     }
  227.     public function getCarrierValueDeclared(): ?float
  228.     {
  229.         return $this->carrierValueDeclared;
  230.     }
  231.     public function setCarrierValueDeclared(?float $carrierValueDeclared): self
  232.     {
  233.         $this->carrierValueDeclared $carrierValueDeclared;
  234.         return $this;
  235.     }
  236.     public function getCustomsValueDeclared(): ?float
  237.     {
  238.         return $this->customsValueDeclared;
  239.     }
  240.     public function setCustomsValueDeclared(?float $customsValueDeclared): self
  241.     {
  242.         $this->customsValueDeclared $customsValueDeclared;
  243.         return $this;
  244.     }
  245.     public function getPrepaidWeightValue(): ?float
  246.     {
  247.         return $this->prepaidWeightValue;
  248.     }
  249.     public function setPrepaidWeightValue(?float $prepaidWeightValue): self
  250.     {
  251.         $this->prepaidWeightValue $prepaidWeightValue;
  252.         return $this;
  253.     }
  254.     public function getCollectWeightValue(): ?float
  255.     {
  256.         return $this->collectWeightValue;
  257.     }
  258.     public function setCollectWeightValue(?float $collectWeightValue): self
  259.     {
  260.         $this->collectWeightValue $collectWeightValue;
  261.         return $this;
  262.     }
  263.     public function getPrepaidValuationValue(): ?float
  264.     {
  265.         return $this->prepaidValuationValue;
  266.     }
  267.     public function setPrepaidValuationValue(?float $prepaidValuationValue): self
  268.     {
  269.         $this->prepaidValuationValue $prepaidValuationValue;
  270.         return $this;
  271.     }
  272.     public function getCollectValuationValue(): ?float
  273.     {
  274.         return $this->collectValuationValue;
  275.     }
  276.     public function setCollectValuationValue(?float $collectValuationValue): self
  277.     {
  278.         $this->collectValuationValue $collectValuationValue;
  279.         return $this;
  280.     }
  281.     public function getPrepaidTaxValue(): ?float
  282.     {
  283.         return $this->prepaidTaxValue;
  284.     }
  285.     public function setPrepaidTaxValue(?float $prepaidTaxValue): self
  286.     {
  287.         $this->prepaidTaxValue $prepaidTaxValue;
  288.         return $this;
  289.     }
  290.     public function getCollectTaxValue(): ?float
  291.     {
  292.         return $this->collectTaxValue;
  293.     }
  294.     public function setCollectTaxValue(?float $collectTaxValue): self
  295.     {
  296.         $this->collectTaxValue $collectTaxValue;
  297.         return $this;
  298.     }
  299.     public function getPrepaidOtherChargesToAgent(): ?float
  300.     {
  301.         return $this->prepaidOtherChargesToAgent;
  302.     }
  303.     public function setPrepaidOtherChargesToAgent(?float $prepaidOtherChargesToAgent): self
  304.     {
  305.         $this->prepaidOtherChargesToAgent $prepaidOtherChargesToAgent;
  306.         return $this;
  307.     }
  308.     public function getCollectOtherChargesToAgent(): ?float
  309.     {
  310.         return $this->collectOtherChargesToAgent;
  311.     }
  312.     public function setCollectOtherChargesToAgent(?float $collectOtherChargesToAgent): self
  313.     {
  314.         $this->collectOtherChargesToAgent $collectOtherChargesToAgent;
  315.         return $this;
  316.     }
  317.     public function getPrepaidOtherChargesToCarrier(): ?float
  318.     {
  319.         return $this->prepaidOtherChargesToCarrier;
  320.     }
  321.     public function setPrepaidOtherChargesToCarrier(?float $prepaidOtherChargesToCarrier): self
  322.     {
  323.         $this->prepaidOtherChargesToCarrier $prepaidOtherChargesToCarrier;
  324.         return $this;
  325.     }
  326.     public function getCollectOtherChargesToCarrier(): ?float
  327.     {
  328.         return $this->collectOtherChargesToCarrier;
  329.     }
  330.     public function setCollectOtherChargesToCarrier(?float $collectOtherChargesToCarrier): self
  331.     {
  332.         $this->collectOtherChargesToCarrier $collectOtherChargesToCarrier;
  333.         return $this;
  334.     }
  335.     public function getDepartureDate(): ?\DateTimeInterface
  336.     {
  337.         return $this->departureDate;
  338.     }
  339.     public function setDepartureDate(?\DateTimeInterface $departureDate): self
  340.     {
  341.         $this->departureDate $departureDate;
  342.         return $this;
  343.     }
  344.     public function getFlightNumber(): ?string
  345.     {
  346.         return $this->flightNumber;
  347.     }
  348.     public function setFlightNumber(?string $flightNumber): self
  349.     {
  350.         $this->flightNumber $flightNumber;
  351.         return $this;
  352.     }
  353.     public function getHandlingInformation(): ?string
  354.     {
  355.         return $this->handlingInformation;
  356.     }
  357.     public function setHandlingInformation(?string $handlingInformation): self
  358.     {
  359.         $this->handlingInformation $handlingInformation;
  360.         return $this;
  361.     }
  362.     public function getNumber(): ?MasterGuideNumber
  363.     {
  364.         return $this->number;
  365.     }
  366.     public function setNumber(?MasterGuideNumber $number): self
  367.     {
  368.         $this->number $number;
  369.         return $this;
  370.     }
  371.     public function getGeneratedAt(): ?\DateTimeImmutable
  372.     {
  373.         return $this->generatedAt;
  374.     }
  375.     public function setGeneratedAt(\DateTimeImmutable $generatedAt): self
  376.     {
  377.         $this->generatedAt $generatedAt;
  378.         return $this;
  379.     }
  380.     public function getGeneratedBy(): ?AppUser
  381.     {
  382.         return $this->generatedBy;
  383.     }
  384.     public function setGeneratedBy(?AppUser $generatedBy): self
  385.     {
  386.         $this->generatedBy $generatedBy;
  387.         return $this;
  388.     }
  389.     /**
  390.      * @return Collection<int, HouseGuide>
  391.      */
  392.     public function getHouseGuides(): Collection
  393.     {
  394.         return $this->houseGuides;
  395.     }
  396.     public function addHouseGuide(HouseGuide $houseGuide): self
  397.     {
  398.         if (!$this->houseGuides->contains($houseGuide)) {
  399.             $this->houseGuides[] = $houseGuide;
  400.             $houseGuide->setMasterGuide($this);
  401.         }
  402.         return $this;
  403.     }
  404.     public function removeHouseGuide(HouseGuide $houseGuide): self
  405.     {
  406.         if ($this->houseGuides->removeElement($houseGuide)) {
  407.             // set the owning side to null (unless already changed)
  408.             if ($houseGuide->getMasterGuide() === $this) {
  409.                 $houseGuide->setMasterGuide(null);
  410.             }
  411.         }
  412.         return $this;
  413.     }
  414.     public function getCargoManifest(): ?CargoManifest
  415.     {
  416.         return $this->cargoManifest;
  417.     }
  418.     public function setCargoManifest(CargoManifest $cargoManifest): self
  419.     {
  420.         // set the owning side of the relation if necessary
  421.         if ($cargoManifest->getMasterGuide() !== $this) {
  422.             $cargoManifest->setMasterGuide($this);
  423.         }
  424.         $this->cargoManifest $cargoManifest;
  425.         return $this;
  426.     }
  427.     /**
  428.      * @return Collection<int, MasterGuideHouseInfo>
  429.      */
  430.     public function getMasterGuideHouseInfos(): Collection
  431.     {
  432.         return $this->masterGuideHouseInfos;
  433.     }
  434.     public function addMasterGuideHouseInfo(MasterGuideHouseInfo $masterGuideHouseInfo): self
  435.     {
  436.         if (!$this->masterGuideHouseInfos->contains($masterGuideHouseInfo)) {
  437.             $this->masterGuideHouseInfos[] = $masterGuideHouseInfo;
  438.             $masterGuideHouseInfo->setMasterGuide($this);
  439.         }
  440.         return $this;
  441.     }
  442.     public function removeMasterGuideHouseInfo(MasterGuideHouseInfo $masterGuideHouseInfo): self
  443.     {
  444.         if ($this->masterGuideHouseInfos->removeElement($masterGuideHouseInfo)) {
  445.             // set the owning side to null (unless already changed)
  446.             if ($masterGuideHouseInfo->getMasterGuide() === $this) {
  447.                 $masterGuideHouseInfo->setMasterGuide(null);
  448.             }
  449.         }
  450.         return $this;
  451.     }
  452.     public function isIsComplete(): ?bool
  453.     {
  454.         return $this->isComplete;
  455.     }
  456.     public function setIsComplete(bool $isComplete): self
  457.     {
  458.         $this->isComplete $isComplete;
  459.         return $this;
  460.     }
  461.     public function __toString()
  462.     {
  463.         return $this->number->getNumber();
  464.     }
  465.     public function getConsignee(): ?Consignee
  466.     {
  467.         return $this->consignee;
  468.     }
  469.     public function setConsignee(?Consignee $consignee): self
  470.     {
  471.         $this->consignee $consignee;
  472.         return $this;
  473.     }
  474.     public function getAccountingInfo(): ?string
  475.     {
  476.         return $this->accountingInfo;
  477.     }
  478.     public function setAccountingInfo(?string $accountingInfo): self
  479.     {
  480.         $this->accountingInfo $accountingInfo;
  481.         return $this;
  482.     }
  483.     public function getAirportDepartureCode(): ?string
  484.     {
  485.         return $this->airportDepartureCode;
  486.     }
  487.     public function setAirportDepartureCode(?string $airportDepartureCode): self
  488.     {
  489.         $this->airportDepartureCode $airportDepartureCode;
  490.         return $this;
  491.     }
  492. }