<?php
namespace App\Entity\Documentation;
use App\Entity\Airline;
use App\Entity\Airplane;
use App\Entity\AppUser;
use App\Entity\Consignee;
use App\Repository\Documentation\MasterGuideRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=MasterGuideRepository::class)
* @ORM\Table(name="documentation_master_guide")
*/
class MasterGuide
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Airline::class, inversedBy="masterGuides")
* @ORM\JoinColumn(nullable=false)
*/
private $airline;
/**
* @ORM\ManyToOne(targetEntity=Airplane::class, inversedBy="masterGuides")
*/
private $airplane;
/**
* @ORM\Column(type="string", length=1024, nullable=true)
*/
private $departureAirport;
/**
* @ORM\Column(type="string", length=1024, nullable=true)
*/
private $arrivalAirport;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $destinationAirportCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $chargeFinalDestination;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $paymentType;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $carrierValueDeclared;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $customsValueDeclared;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prepaidWeightValue;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $collectWeightValue;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prepaidValuationValue;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $collectValuationValue;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prepaidTaxValue;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $collectTaxValue;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prepaidOtherChargesToAgent;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $collectOtherChargesToAgent;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $prepaidOtherChargesToCarrier;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $collectOtherChargesToCarrier;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $departureDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $flightNumber;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $handlingInformation;
/**
* @ORM\ManyToOne(targetEntity=MasterGuideNumber::class, inversedBy="masterGuides")
*/
private $number;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $generatedAt;
/**
* @ORM\ManyToOne(targetEntity=AppUser::class, inversedBy="masterGuides")
* @ORM\JoinColumn(nullable=false)
*/
private $generatedBy;
/**
* @ORM\OneToMany(targetEntity=HouseGuide::class, mappedBy="masterGuide")
*/
private $houseGuides;
/**
* @ORM\OneToOne(targetEntity=CargoManifest::class, mappedBy="masterGuide", cascade={"persist", "remove"})
*/
private $cargoManifest;
/**
* @ORM\OneToMany(targetEntity=MasterGuideHouseInfo::class, mappedBy="masterGuide")
*/
private $masterGuideHouseInfos;
/**
* @ORM\Column(type="boolean")
*/
private $isComplete;
/**
* @ORM\ManyToOne(targetEntity=Consignee::class, inversedBy="masterGuides")
* @ORM\JoinColumn(nullable=false)
*/
private $consignee;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $accountingInfo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $airportDepartureCode;
public function __construct()
{
$this->houseGuides = new ArrayCollection();
$this->masterGuideHouseInfos = new ArrayCollection();
$this->isComplete = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getAirline(): ?Airline
{
return $this->airline;
}
public function setAirline(?Airline $airline): self
{
$this->airline = $airline;
return $this;
}
public function getAirplane(): ?Airplane
{
return $this->airplane;
}
public function setAirplane(?Airplane $airplane): self
{
$this->airplane = $airplane;
return $this;
}
public function getDepartureAirport(): ?string
{
return $this->departureAirport;
}
public function setDepartureAirport(?string $departureAirport): self
{
$this->departureAirport = $departureAirport;
return $this;
}
public function getArrivalAirport(): ?string
{
return $this->arrivalAirport;
}
public function setArrivalAirport(?string $arrivalAirport): self
{
$this->arrivalAirport = $arrivalAirport;
return $this;
}
public function getDestinationAirportCode(): ?string
{
return $this->destinationAirportCode;
}
public function setDestinationAirportCode(?string $destinationAirportCode): self
{
$this->destinationAirportCode = $destinationAirportCode;
return $this;
}
public function getChargeFinalDestination(): ?string
{
return $this->chargeFinalDestination;
}
public function setChargeFinalDestination(?string $chargeFinalDestination): self
{
$this->chargeFinalDestination = $chargeFinalDestination;
return $this;
}
public function getPaymentType(): ?string
{
return $this->paymentType;
}
public function setPaymentType(?string $paymentType): self
{
$this->paymentType = $paymentType;
return $this;
}
public function getCarrierValueDeclared(): ?float
{
return $this->carrierValueDeclared;
}
public function setCarrierValueDeclared(?float $carrierValueDeclared): self
{
$this->carrierValueDeclared = $carrierValueDeclared;
return $this;
}
public function getCustomsValueDeclared(): ?float
{
return $this->customsValueDeclared;
}
public function setCustomsValueDeclared(?float $customsValueDeclared): self
{
$this->customsValueDeclared = $customsValueDeclared;
return $this;
}
public function getPrepaidWeightValue(): ?float
{
return $this->prepaidWeightValue;
}
public function setPrepaidWeightValue(?float $prepaidWeightValue): self
{
$this->prepaidWeightValue = $prepaidWeightValue;
return $this;
}
public function getCollectWeightValue(): ?float
{
return $this->collectWeightValue;
}
public function setCollectWeightValue(?float $collectWeightValue): self
{
$this->collectWeightValue = $collectWeightValue;
return $this;
}
public function getPrepaidValuationValue(): ?float
{
return $this->prepaidValuationValue;
}
public function setPrepaidValuationValue(?float $prepaidValuationValue): self
{
$this->prepaidValuationValue = $prepaidValuationValue;
return $this;
}
public function getCollectValuationValue(): ?float
{
return $this->collectValuationValue;
}
public function setCollectValuationValue(?float $collectValuationValue): self
{
$this->collectValuationValue = $collectValuationValue;
return $this;
}
public function getPrepaidTaxValue(): ?float
{
return $this->prepaidTaxValue;
}
public function setPrepaidTaxValue(?float $prepaidTaxValue): self
{
$this->prepaidTaxValue = $prepaidTaxValue;
return $this;
}
public function getCollectTaxValue(): ?float
{
return $this->collectTaxValue;
}
public function setCollectTaxValue(?float $collectTaxValue): self
{
$this->collectTaxValue = $collectTaxValue;
return $this;
}
public function getPrepaidOtherChargesToAgent(): ?float
{
return $this->prepaidOtherChargesToAgent;
}
public function setPrepaidOtherChargesToAgent(?float $prepaidOtherChargesToAgent): self
{
$this->prepaidOtherChargesToAgent = $prepaidOtherChargesToAgent;
return $this;
}
public function getCollectOtherChargesToAgent(): ?float
{
return $this->collectOtherChargesToAgent;
}
public function setCollectOtherChargesToAgent(?float $collectOtherChargesToAgent): self
{
$this->collectOtherChargesToAgent = $collectOtherChargesToAgent;
return $this;
}
public function getPrepaidOtherChargesToCarrier(): ?float
{
return $this->prepaidOtherChargesToCarrier;
}
public function setPrepaidOtherChargesToCarrier(?float $prepaidOtherChargesToCarrier): self
{
$this->prepaidOtherChargesToCarrier = $prepaidOtherChargesToCarrier;
return $this;
}
public function getCollectOtherChargesToCarrier(): ?float
{
return $this->collectOtherChargesToCarrier;
}
public function setCollectOtherChargesToCarrier(?float $collectOtherChargesToCarrier): self
{
$this->collectOtherChargesToCarrier = $collectOtherChargesToCarrier;
return $this;
}
public function getDepartureDate(): ?\DateTimeInterface
{
return $this->departureDate;
}
public function setDepartureDate(?\DateTimeInterface $departureDate): self
{
$this->departureDate = $departureDate;
return $this;
}
public function getFlightNumber(): ?string
{
return $this->flightNumber;
}
public function setFlightNumber(?string $flightNumber): self
{
$this->flightNumber = $flightNumber;
return $this;
}
public function getHandlingInformation(): ?string
{
return $this->handlingInformation;
}
public function setHandlingInformation(?string $handlingInformation): self
{
$this->handlingInformation = $handlingInformation;
return $this;
}
public function getNumber(): ?MasterGuideNumber
{
return $this->number;
}
public function setNumber(?MasterGuideNumber $number): self
{
$this->number = $number;
return $this;
}
public function getGeneratedAt(): ?\DateTimeImmutable
{
return $this->generatedAt;
}
public function setGeneratedAt(\DateTimeImmutable $generatedAt): self
{
$this->generatedAt = $generatedAt;
return $this;
}
public function getGeneratedBy(): ?AppUser
{
return $this->generatedBy;
}
public function setGeneratedBy(?AppUser $generatedBy): self
{
$this->generatedBy = $generatedBy;
return $this;
}
/**
* @return Collection<int, HouseGuide>
*/
public function getHouseGuides(): Collection
{
return $this->houseGuides;
}
public function addHouseGuide(HouseGuide $houseGuide): self
{
if (!$this->houseGuides->contains($houseGuide)) {
$this->houseGuides[] = $houseGuide;
$houseGuide->setMasterGuide($this);
}
return $this;
}
public function removeHouseGuide(HouseGuide $houseGuide): self
{
if ($this->houseGuides->removeElement($houseGuide)) {
// set the owning side to null (unless already changed)
if ($houseGuide->getMasterGuide() === $this) {
$houseGuide->setMasterGuide(null);
}
}
return $this;
}
public function getCargoManifest(): ?CargoManifest
{
return $this->cargoManifest;
}
public function setCargoManifest(CargoManifest $cargoManifest): self
{
// set the owning side of the relation if necessary
if ($cargoManifest->getMasterGuide() !== $this) {
$cargoManifest->setMasterGuide($this);
}
$this->cargoManifest = $cargoManifest;
return $this;
}
/**
* @return Collection<int, MasterGuideHouseInfo>
*/
public function getMasterGuideHouseInfos(): Collection
{
return $this->masterGuideHouseInfos;
}
public function addMasterGuideHouseInfo(MasterGuideHouseInfo $masterGuideHouseInfo): self
{
if (!$this->masterGuideHouseInfos->contains($masterGuideHouseInfo)) {
$this->masterGuideHouseInfos[] = $masterGuideHouseInfo;
$masterGuideHouseInfo->setMasterGuide($this);
}
return $this;
}
public function removeMasterGuideHouseInfo(MasterGuideHouseInfo $masterGuideHouseInfo): self
{
if ($this->masterGuideHouseInfos->removeElement($masterGuideHouseInfo)) {
// set the owning side to null (unless already changed)
if ($masterGuideHouseInfo->getMasterGuide() === $this) {
$masterGuideHouseInfo->setMasterGuide(null);
}
}
return $this;
}
public function isIsComplete(): ?bool
{
return $this->isComplete;
}
public function setIsComplete(bool $isComplete): self
{
$this->isComplete = $isComplete;
return $this;
}
public function __toString()
{
return $this->number->getNumber();
}
public function getConsignee(): ?Consignee
{
return $this->consignee;
}
public function setConsignee(?Consignee $consignee): self
{
$this->consignee = $consignee;
return $this;
}
public function getAccountingInfo(): ?string
{
return $this->accountingInfo;
}
public function setAccountingInfo(?string $accountingInfo): self
{
$this->accountingInfo = $accountingInfo;
return $this;
}
public function getAirportDepartureCode(): ?string
{
return $this->airportDepartureCode;
}
public function setAirportDepartureCode(?string $airportDepartureCode): self
{
$this->airportDepartureCode = $airportDepartureCode;
return $this;
}
}