src/Core/Entity/Subscripciones/PagoSubscripcion.php line 16

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