src/JanusHercules/AtsIntegration/Infrastructure/Entity/AtsIntegrationRequest.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace JanusHercules\AtsIntegration\Infrastructure\Entity;
  4. use App\Utility\DatabaseIdGenerator;
  5. use App\Utility\DateTimeUtility;
  6. use DateTime;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Entity]
  10. #[ORM\Table(name: 'ats_integration_requests')]
  11. class AtsIntegrationRequest
  12. {
  13. public function __construct()
  14. {
  15. $this->createdAt = DateTimeUtility::createDateTimeCet();
  16. }
  17. #[ORM\Id]
  18. #[ORM\GeneratedValue(strategy: 'CUSTOM')]
  19. #[ORM\CustomIdGenerator(class: DatabaseIdGenerator::class)]
  20. #[ORM\Column(
  21. type: Types::GUID,
  22. unique: true
  23. )]
  24. private ?string $id = null;
  25. public function getId(): ?string
  26. {
  27. return $this->id;
  28. }
  29. #[ORM\Column(
  30. type : Types::DATETIME_MUTABLE,
  31. nullable: false
  32. )]
  33. private DateTime $createdAt;
  34. public function setCreatedAt(DateTime $createdAt): void
  35. {
  36. $this->createdAt = $createdAt;
  37. }
  38. public function getCreatedAt(): DateTime
  39. {
  40. return $this->createdAt;
  41. }
  42. #[ORM\Column(
  43. type : Types::TEXT,
  44. nullable: false
  45. )]
  46. private string $request;
  47. public function setRequest(string $request): void
  48. {
  49. $this->request = $request;
  50. }
  51. public function getRequest(): string
  52. {
  53. return $this->request;
  54. }
  55. #[ORM\Column(
  56. type : Types::TEXT,
  57. nullable: true
  58. )]
  59. private ?string $response = null;
  60. public function setResponse(?string $response): void
  61. {
  62. $this->response = $response;
  63. }
  64. public function getResponse(): ?string
  65. {
  66. return $this->response;
  67. }
  68. #[ORM\Column(
  69. type : Types::INTEGER,
  70. nullable: false
  71. )]
  72. private int $jobId;
  73. public function setJobId(int $jobId): void
  74. {
  75. $this->jobId = $jobId;
  76. }
  77. public function getJobId(): int
  78. {
  79. return $this->jobId;
  80. }
  81. #[ORM\Column(
  82. type : Types::GUID,
  83. nullable: false
  84. )]
  85. private string $recurrentJobId;
  86. public function setRecurrentJobId(string $recurrentJobId): void
  87. {
  88. $this->recurrentJobId = $recurrentJobId;
  89. }
  90. public function getRecurrentJobId(): string
  91. {
  92. return $this->recurrentJobId;
  93. }
  94. #[ORM\Column(
  95. type : Types::GUID,
  96. nullable: false
  97. )]
  98. private string $extendedApplicationId;
  99. public function setExtendedApplicationId(string $extendedApplicationId): void
  100. {
  101. $this->extendedApplicationId = $extendedApplicationId;
  102. }
  103. public function getExtendedApplicationId(): string
  104. {
  105. return $this->extendedApplicationId;
  106. }
  107. }