vendor/croisiland/common-bundle/src/Entity/Correspondence/StopoverCorrespondence.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Correspondence;
  4. use Crea\ParameterBundle\Entity\Parameter;
  5. use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
  6. use Croisiland\CommonBundle\Annotation\Correspondence\StopoverCorrespondenceFormValidator;
  7. use Croisiland\CommonBundle\Entity\Company\Company;
  8. use Croisiland\CommonBundle\Entity\Itinerary\Stopover;
  9. use Croisiland\CommonBundle\Repository\Correspondence\StopoverCorrespondenceRepository;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12. * @StopoverCorrespondenceFormValidator(groups="stopover_correspondence_form_validator")
  13. *
  14. * @ORM\Entity(repositoryClass=StopoverCorrespondenceRepository::class)
  15. */
  16. class StopoverCorrespondence
  17. {
  18. use LifecycleUserIdentifierTrait;
  19. /**
  20. * @ORM\Id
  21. *
  22. * @ORM\GeneratedValue
  23. *
  24. * @ORM\Column(type="integer")
  25. */
  26. private ?int $id = null;
  27. /**
  28. * @ORM\Column(type="string", length=255, nullable=false)
  29. */
  30. private string $name;
  31. /**
  32. * @ORM\Column(type="string", length=255, nullable=true)
  33. */
  34. private string $countryCode;
  35. /**
  36. * @ORM\Column(type="string", length=255, nullable=false)
  37. */
  38. private string $code;
  39. /**
  40. * @ORM\ManyToOne(targetEntity=Stopover::class, inversedBy="stopoverCorrespondences")
  41. */
  42. private ?Stopover $stopover = null;
  43. /**
  44. * @ORM\ManyToOne(targetEntity=Company::class)
  45. *
  46. * @ORM\JoinColumn(nullable=false)
  47. */
  48. private ?Company $originCompany;
  49. /**
  50. * @ORM\ManyToOne(targetEntity=Parameter::class)
  51. *
  52. * @ORM\JoinColumn(nullable=true)
  53. */
  54. private ?Parameter $relationOrigin = null;
  55. public function getId(): ?int
  56. {
  57. return $this->id;
  58. }
  59. public function getName(): ?string
  60. {
  61. return $this->name;
  62. }
  63. public function setName(?string $name): self
  64. {
  65. $this->name = $name;
  66. return $this;
  67. }
  68. public function getCountryCode(): ?string
  69. {
  70. return $this->countryCode;
  71. }
  72. public function setCountryCode(?string $countryCode): self
  73. {
  74. $this->countryCode = $countryCode;
  75. return $this;
  76. }
  77. public function getCode(): ?string
  78. {
  79. return $this->code;
  80. }
  81. public function setCode(?string $code): self
  82. {
  83. $this->code = $code;
  84. return $this;
  85. }
  86. public function getStopover(): ?Stopover
  87. {
  88. return $this->stopover;
  89. }
  90. public function setStopover(?Stopover $stopover): self
  91. {
  92. $this->stopover = $stopover;
  93. return $this;
  94. }
  95. public function getOriginCompany(): ?Company
  96. {
  97. return $this->originCompany;
  98. }
  99. public function setOriginCompany(?Company $originCompany): self
  100. {
  101. $this->originCompany = $originCompany;
  102. return $this;
  103. }
  104. public function getRelationOrigin(): ?Parameter
  105. {
  106. return $this->relationOrigin;
  107. }
  108. public function setRelationOrigin(?Parameter $relationOrigin): StopoverCorrespondence
  109. {
  110. $this->relationOrigin = $relationOrigin;
  111. return $this;
  112. }
  113. }