src/Core/Entity/Subscripciones/HistorialPagoSubscripcion.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Core\Entity\Subscripciones;
  3. use App\Core\Entity\Curso;
  4. use App\Core\Entity\Cybersource\CybersourceTransLog;
  5. use App\Core\Entity\Estudiante;
  6. use App\Core\Entity\Maestro;
  7. use App\Core\Repository\Subscripciones\HistorialPagoSubscripcionRepository;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10. * @ORM\Entity(repositoryClass=HistorialPagoSubscripcionRepository::class)
  11. */
  12. class HistorialPagoSubscripcion
  13. {
  14. const JSON_FIELDS = ['id', 'curso' => ['id'], 'maestro' => ['id'], 'estudiante' => ['id'], 'fechaPago', 'fechaExpiracion', 'monto', 'tipo', 'detalles', 'estado'];
  15. /**
  16. * @ORM\Id
  17. * @ORM\GeneratedValue
  18. * @ORM\Column(type="integer")
  19. */
  20. private $id;
  21. /**
  22. * @ORM\ManyToOne(targetEntity=Curso::class, inversedBy="historialPagosSubscripcion")
  23. */
  24. private $curso;
  25. /**
  26. * @ORM\ManyToOne(targetEntity=Maestro::class, inversedBy="historialPagosSubscripcion")
  27. */
  28. private $maestro;
  29. /**
  30. * @ORM\ManyToOne(targetEntity=Estudiante::class, inversedBy="historialPagosSubscripcion")
  31. */
  32. private $estudiante;
  33. /**
  34. * @ORM\Column(type="datetime")
  35. */
  36. private $fechaPago;
  37. /**
  38. * @ORM\Column(type="datetime", nullable=true)
  39. */
  40. private $fechaExpiracion;
  41. /**
  42. * @ORM\Column(type="float", nullable=true)
  43. */
  44. private $monto;
  45. /**
  46. * @ORM\Column(type="string", length=50)
  47. */
  48. private $tipo;
  49. /**
  50. * @ORM\Column(type="json", nullable=true)
  51. */
  52. private $detalles = [];
  53. /**
  54. * @ORM\Column(type="integer")
  55. * 1 = activa
  56. * 2 = pendiente de pago
  57. * 3 = vencida
  58. */
  59. private $estado;
  60. /**
  61. * @ORM\ManyToOne(targetEntity=PagoSubscripcion::class, inversedBy="historialPagosSubscripcion")
  62. * @ORM\JoinColumn(nullable=false)
  63. */
  64. private $suscripcion;
  65. /**
  66. * @ORM\OneToOne(targetEntity=CybersourceTransLog::class, inversedBy="historialPagoSuscripcion")
  67. * @ORM\JoinColumn(nullable=true)
  68. */
  69. private $cybersourceTransLog;
  70. public function getId(): ?int
  71. {
  72. return $this->id;
  73. }
  74. public function getCurso(): ?Curso
  75. {
  76. return $this->curso;
  77. }
  78. public function setCurso(?Curso $curso): self
  79. {
  80. $this->curso = $curso;
  81. return $this;
  82. }
  83. public function getMaestro(): ?Maestro
  84. {
  85. return $this->maestro;
  86. }
  87. public function setMaestro(?Maestro $maestro): self
  88. {
  89. $this->maestro = $maestro;
  90. return $this;
  91. }
  92. public function getEstudiante(): ?Estudiante
  93. {
  94. return $this->estudiante;
  95. }
  96. public function setEstudiante(?Estudiante $estudiante): self
  97. {
  98. $this->estudiante = $estudiante;
  99. return $this;
  100. }
  101. public function getSuscripcion(): ?PagoSubscripcion
  102. {
  103. return $this->suscripcion;
  104. }
  105. public function setSuscripcion(?PagoSubscripcion $pagoSubscripcion): self
  106. {
  107. $this->suscripcion = $pagoSubscripcion;
  108. return $this;
  109. }
  110. public function getFechaPago(): ?\DateTimeInterface
  111. {
  112. return $this->fechaPago;
  113. }
  114. public function setFechaPago(\DateTimeInterface $fechaPago): self
  115. {
  116. $this->fechaPago = $fechaPago;
  117. return $this;
  118. }
  119. public function getFechaExpiracion(): ?\DateTimeInterface
  120. {
  121. return $this->fechaExpiracion;
  122. }
  123. public function setFechaExpiracion(?\DateTimeInterface $fechaExpiracion): self
  124. {
  125. $this->fechaExpiracion = $fechaExpiracion;
  126. return $this;
  127. }
  128. public function getMonto(): ?float
  129. {
  130. return $this->monto;
  131. }
  132. public function setMonto(?float $monto): self
  133. {
  134. $this->monto = $monto;
  135. return $this;
  136. }
  137. public function getTipo(): ?string
  138. {
  139. return $this->tipo;
  140. }
  141. public function setTipo(string $tipo): self
  142. {
  143. $this->tipo = $tipo;
  144. return $this;
  145. }
  146. public function getDetalles(): ?array
  147. {
  148. return $this->detalles;
  149. }
  150. public function setDetalles(?array $detalles): self
  151. {
  152. $this->detalles = $detalles;
  153. return $this;
  154. }
  155. public function getEstado(): ?int
  156. {
  157. return $this->estado;
  158. }
  159. public function setEstado(?int $estado): self
  160. {
  161. $this->estado = $estado;
  162. return $this;
  163. }
  164. public function getCybersourceTransLog(): ?CybersourceTransLog
  165. {
  166. return $this->cybersourceTransLog;
  167. }
  168. public function setCybersourceTransLog(CybersourceTransLog $cybersourceTransLog = null): self
  169. {
  170. $this->cybersourceTransLog = $cybersourceTransLog;
  171. return $this;
  172. }
  173. }