src/Entity/Logs/StripeNotification.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Logs;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="stripe_notification")
  7. *
  8. * @ORM\Entity(repositoryClass="App\Repository\Logs\StripeNotificationRepository")
  9. */
  10. class StripeNotification
  11. {
  12. /**
  13. * @ORM\Id
  14. *
  15. * @ORM\GeneratedValue(strategy="AUTO")
  16. *
  17. * @ORM\Column(type="integer", name="id")
  18. */
  19. private ?int $id = null;
  20. /**
  21. * @ORM\Column(type="integer", name="order_id")
  22. */
  23. private ?int $order = null;
  24. /**
  25. * @ORM\Column(type="integer", name="customer_id", nullable=true)
  26. */
  27. private ?int $customer = null;
  28. /**
  29. * @ORM\Column(type="string", name="checkout_session_reference", nullable=true)
  30. */
  31. private ?string $checkoutSession = null;
  32. /**
  33. * @ORM\Column(type="string", name="event_code")
  34. */
  35. private string $eventCode;
  36. /**
  37. * @ORM\Column(type="boolean", name="paid")
  38. */
  39. private bool $paid;
  40. /**
  41. * @ORM\Column(type="string", name="subscription", nullable=true)
  42. */
  43. private ?string $subscription = null;
  44. /**
  45. * @ORM\Column(type="text", nullable=true, name="error_message")
  46. */
  47. private ?string $errorMessage = null;
  48. /**
  49. * @ORM\Column(type="integer", name="attempts", nullable=true)
  50. */
  51. private ?int $attempts = null;
  52. /**
  53. * @ORM\Column(name="next_payment_attempt", type="datetime", nullable=true)
  54. */
  55. private ?\DateTime $nextPaymentAttempt = null;
  56. /**
  57. * @ORM\Column(type="text", name="message")
  58. */
  59. private string $message;
  60. /**
  61. * @ORM\Column(name="date_add", type="datetime")
  62. */
  63. private \DateTime $dateAdd;
  64. public function __construct()
  65. {
  66. $this->dateAdd = new \DateTime();
  67. }
  68. public function getId(): int
  69. {
  70. return $this->id;
  71. }
  72. public function getOrder(): ?int
  73. {
  74. return $this->order;
  75. }
  76. public function setOrder(?int $order): StripeNotification
  77. {
  78. $this->order = $order;
  79. return $this;
  80. }
  81. public function getCustomer(): ?int
  82. {
  83. return $this->customer;
  84. }
  85. public function setCustomer(?int $customer): StripeNotification
  86. {
  87. $this->customer = $customer;
  88. return $this;
  89. }
  90. public function getCheckoutSession(): ?string
  91. {
  92. return $this->checkoutSession;
  93. }
  94. public function setCheckoutSession(?string $checkoutSession): StripeNotification
  95. {
  96. $this->checkoutSession = $checkoutSession;
  97. return $this;
  98. }
  99. public function getEventCode(): string
  100. {
  101. return $this->eventCode;
  102. }
  103. public function setEventCode(string $eventCode): StripeNotification
  104. {
  105. $this->eventCode = $eventCode;
  106. return $this;
  107. }
  108. public function isPaid(): bool
  109. {
  110. return $this->paid;
  111. }
  112. public function setPaid(bool $paid): StripeNotification
  113. {
  114. $this->paid = $paid;
  115. return $this;
  116. }
  117. public function getMessage(): string
  118. {
  119. return $this->message;
  120. }
  121. public function setMessage(string $message): StripeNotification
  122. {
  123. $this->message = $message;
  124. return $this;
  125. }
  126. public function getDateAdd(): \DateTime
  127. {
  128. return $this->dateAdd;
  129. }
  130. public function getSubscription(): ?string
  131. {
  132. return $this->subscription;
  133. }
  134. public function setSubscription(?string $subscription): StripeNotification
  135. {
  136. $this->subscription = $subscription;
  137. return $this;
  138. }
  139. public function getErrorMessage(): ?string
  140. {
  141. return $this->errorMessage;
  142. }
  143. public function setErrorMessage(string $errorMessage): StripeNotification
  144. {
  145. $this->errorMessage = $errorMessage;
  146. return $this;
  147. }
  148. public function getAttempts(): ?int
  149. {
  150. return $this->attempts;
  151. }
  152. public function setAttempts(?int $attempts): StripeNotification
  153. {
  154. $this->attempts = $attempts;
  155. return $this;
  156. }
  157. public function getNextPaymentAttempt(): ?\DateTime
  158. {
  159. return $this->nextPaymentAttempt;
  160. }
  161. public function setNextPaymentAttempt(?\DateTime $nextPaymentAttempt): StripeNotification
  162. {
  163. $this->nextPaymentAttempt = $nextPaymentAttempt;
  164. return $this;
  165. }
  166. }