<?phpdeclare(strict_types=1);namespace Croisiland\CommonBundle\Entity\Correspondence;use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;use Croisiland\CommonBundle\Annotation\Correspondence\DestinationCorrespondenceFormValidator;use Croisiland\CommonBundle\Entity\Company\Company;use Croisiland\CommonBundle\Entity\Itinerary\DestinationMain;use Croisiland\CommonBundle\Entity\Itinerary\DestinationSecondary;use Croisiland\CommonBundle\Repository\Correspondence\DestinationCorrespondenceRepository;use Doctrine\ORM\Mapping as ORM;/** * @DestinationCorrespondenceFormValidator(groups="destination_correspondence_form_validator") * * @ORM\Entity(repositoryClass=DestinationCorrespondenceRepository::class) */class DestinationCorrespondence{ // TODO Add relations // * @var Compagny use LifecycleUserIdentifierTrait; /** * @ORM\Id * * @ORM\GeneratedValue * * @ORM\Column(type="integer") */ private ?int $id = null; /** * @ORM\Column(type="string", length=255) */ private string $name; /** * @ORM\Column(type="string", length=255) */ private string $code; /** * @ORM\ManyToOne(targetEntity=DestinationMain::class, inversedBy="destinationCorrespondences") */ private ?DestinationMain $destination = null; /** * @ORM\ManyToOne(targetEntity=DestinationSecondary::class, inversedBy="destinationCorrespondences") */ private ?DestinationSecondary $destinationSecondary = null; /** * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="originatedCorrespondencesDestinations") * * @ORM\JoinColumn(nullable=false) */ private ?Company $originCompany; public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getCode(): ?string { return $this->code; } public function setCode(string $code): self { $this->code = $code; return $this; } public function getDestination(): ?DestinationMain { return $this->destination; } public function setDestination(?DestinationMain $destination): self { $this->destination = $destination; return $this; } public function getDestinationSecondary(): ?DestinationSecondary { return $this->destinationSecondary; } public function setDestinationSecondary(?DestinationSecondary $destinationSecondary): self { $this->destinationSecondary = $destinationSecondary; return $this; } public function getOriginCompany(): ?Company { return $this->originCompany; } public function setOriginCompany(?Company $originCompany): self { $this->originCompany = $originCompany; return $this; }}