src/Entity/System/CustomerPaymentMethod.php line 14

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\System;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="customer_payment_method")
  7. *
  8. * @ORM\Entity(repositoryClass="App\Repository\System\CustomerPaymentMethodRepository")
  9. */
  10. class CustomerPaymentMethod
  11. {
  12. /**
  13. * @ORM\Id
  14. *
  15. * @ORM\GeneratedValue(strategy="AUTO")
  16. *
  17. * @ORM\Column(type="integer", name="id")
  18. */
  19. private int $id;
  20. /**
  21. * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="customerPaymentMethods")
  22. *
  23. * @ORM\JoinColumn(name="customer_id", referencedColumnName="id_customer", nullable=false)
  24. */
  25. private Customer $customer;
  26. /**
  27. * @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod", inversedBy="customerPaymentMethods")
  28. *
  29. * @ORM\JoinColumn(name="payment_method_id", referencedColumnName="id_payment_method", nullable=false)
  30. */
  31. private PaymentMethod $paymentMethod;
  32. /**
  33. * @ORM\Column(type="string", length=255, nullable=true)
  34. */
  35. private ?string $externalReference = null;
  36. /**
  37. * @ORM\Column(type="string", length=255, nullable=true)
  38. */
  39. private ?string $externalMandateReference = null;
  40. /**
  41. * @ORM\Column(type="string", length=255, nullable=true)
  42. */
  43. private ?string $externalEmailReference = null;
  44. /**
  45. * @ORM\Column(name="date_add", type="datetime")
  46. */
  47. private \DateTime $dateAdd;
  48. /**
  49. * @ORM\Column(name="date_upd", type="datetime", nullable=true)
  50. */
  51. private ?\DateTime $dateUpd = null;
  52. /**
  53. * @ORM\Column(name="active", type="boolean", options={"default" : 1})
  54. */
  55. private bool $active;
  56. public function __construct()
  57. {
  58. $this->dateAdd = new \DateTime();
  59. }
  60. public function getId(): int
  61. {
  62. return $this->id;
  63. }
  64. public function getCustomer(): ?Customer
  65. {
  66. return $this->customer;
  67. }
  68. public function setCustomer(?Customer $customer): self
  69. {
  70. $this->customer = $customer;
  71. return $this;
  72. }
  73. public function getPaymentMethod(): PaymentMethod
  74. {
  75. return $this->paymentMethod;
  76. }
  77. public function setPaymentMethod(PaymentMethod $paymentMethod): self
  78. {
  79. $this->paymentMethod = $paymentMethod;
  80. return $this;
  81. }
  82. public function getExternalReference(): ?string
  83. {
  84. return $this->externalReference;
  85. }
  86. public function setExternalReference(?string $externalReference = null): self
  87. {
  88. $this->externalReference = $externalReference;
  89. return $this;
  90. }
  91. public function getExternalMandateReference(): ?string
  92. {
  93. return $this->externalMandateReference;
  94. }
  95. public function setExternalMandateReference(?string $externalMandateReference = null): self
  96. {
  97. $this->externalMandateReference = $externalMandateReference;
  98. return $this;
  99. }
  100. public function getExternalEmailReference(): ?string
  101. {
  102. return $this->externalEmailReference;
  103. }
  104. public function setExternalEmailReference(?string $externalEmailReference = null): self
  105. {
  106. $this->externalEmailReference = $externalEmailReference;
  107. return $this;
  108. }
  109. public function isActive(): bool
  110. {
  111. return $this->active;
  112. }
  113. public function setActive(bool $active): self
  114. {
  115. $this->active = $active;
  116. return $this;
  117. }
  118. public function getDateAdd(): \DateTime
  119. {
  120. return $this->dateAdd;
  121. }
  122. public function setDateAdd(?\DateTime $dateAdd): self
  123. {
  124. $this->dateAdd = $dateAdd;
  125. return $this;
  126. }
  127. public function getDateUpd(): ?\DateTime
  128. {
  129. return $this->dateUpd;
  130. }
  131. public function setDateUpd(?\DateTime $dateUpd): self
  132. {
  133. $this->dateUpd = $dateUpd;
  134. return $this;
  135. }
  136. }