src/App/Entity/ExternalPartner/RecurrentJobAdditionalInfo.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ExternalPartner;
  3. use App\Entity\RecurrentJob;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Exception;
  6. /**
  7. * @ORM\Entity
  8. *
  9. * @ORM\Table(
  10. * name="external_partner_recurrent_job_additional_infos",
  11. * indexes={
  12. *
  13. * @ORM\Index(name="info_name_info_string_value_idx", columns={"info_name", "info_string_value"}),
  14. * @ORM\Index(name="info_name_info_int_value_idx", columns={"info_name", "info_int_value"})
  15. * }
  16. * )
  17. */
  18. class RecurrentJobAdditionalInfo
  19. {
  20. /**
  21. * @var RecurrentJob
  22. *
  23. * @ORM\ManyToOne(targetEntity="App\Entity\RecurrentJob", inversedBy="externalPartnerRecurrentJobAdditionalInfos", cascade={"persist"})
  24. *
  25. * @ORM\Id
  26. *
  27. * @ORM\JoinColumn(name="recurrent_jobs_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  28. */
  29. private $recurrentJob;
  30. public function getRecurrentJob(): RecurrentJob
  31. {
  32. return $this->recurrentJob;
  33. }
  34. public function setRecurrentJob(RecurrentJob $recurrentJob)
  35. {
  36. $this->recurrentJob = $recurrentJob;
  37. }
  38. /**
  39. * @var string
  40. *
  41. * @ORM\Id
  42. *
  43. * @ORM\Column(type="string", nullable=false)
  44. */
  45. private $infoName;
  46. public function getInfoName(): string
  47. {
  48. return $this->infoName;
  49. }
  50. public function setInfoName(string $infoName): void
  51. {
  52. $this->infoName = $infoName;
  53. }
  54. /**
  55. * @var string
  56. *
  57. * @ORM\Column(type="string", nullable=true, length=15000)
  58. */
  59. private $infoStringValue;
  60. public function getInfoStringValue(): ?string
  61. {
  62. return $this->infoStringValue;
  63. }
  64. /** @throws Exception */
  65. public function setInfoStringValue(?string $infoStringValue): void
  66. {
  67. if (!is_null($this->infoIntValue)) {
  68. throw new Exception('Cannot set infoStringValue because infoIntValue is already set.');
  69. }
  70. $this->infoStringValue = $infoStringValue;
  71. }
  72. /**
  73. * @var int
  74. *
  75. * @ORM\Column(type="integer", nullable=true)
  76. */
  77. private $infoIntValue;
  78. public function getInfoIntValue(): ?int
  79. {
  80. return $this->infoIntValue;
  81. }
  82. /** @throws Exception */
  83. public function setInfoIntValue(?int $infoIntValue): void
  84. {
  85. if (!is_null($this->infoStringValue)) {
  86. throw new Exception('Cannot set infoIntValue because infoStringValue is already set.');
  87. }
  88. $this->infoIntValue = $infoIntValue;
  89. }
  90. }