<?php
namespace App\Core\Entity\Subscripciones;
use App\Core\Entity\Curso;
use App\Core\Entity\Cybersource\CybersourceTransLog;
use App\Core\Entity\Estudiante;
use App\Core\Entity\Maestro;
use App\Core\Repository\Subscripciones\HistorialPagoSubscripcionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=HistorialPagoSubscripcionRepository::class)
*/
class HistorialPagoSubscripcion
{
const JSON_FIELDS = ['id', 'curso' => ['id'], 'maestro' => ['id'], 'estudiante' => ['id'], 'fechaPago', 'fechaExpiracion', 'monto', 'tipo', 'detalles', 'estado'];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Curso::class, inversedBy="historialPagosSubscripcion")
*/
private $curso;
/**
* @ORM\ManyToOne(targetEntity=Maestro::class, inversedBy="historialPagosSubscripcion")
*/
private $maestro;
/**
* @ORM\ManyToOne(targetEntity=Estudiante::class, inversedBy="historialPagosSubscripcion")
*/
private $estudiante;
/**
* @ORM\Column(type="datetime")
*/
private $fechaPago;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $fechaExpiracion;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $monto;
/**
* @ORM\Column(type="string", length=50)
*/
private $tipo;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $detalles = [];
/**
* @ORM\Column(type="integer")
* 1 = activa
* 2 = pendiente de pago
* 3 = vencida
*/
private $estado;
/**
* @ORM\ManyToOne(targetEntity=PagoSubscripcion::class, inversedBy="historialPagosSubscripcion")
* @ORM\JoinColumn(nullable=false)
*/
private $suscripcion;
/**
* @ORM\OneToOne(targetEntity=CybersourceTransLog::class, inversedBy="historialPagoSuscripcion")
* @ORM\JoinColumn(nullable=true)
*/
private $cybersourceTransLog;
public function getId(): ?int
{
return $this->id;
}
public function getCurso(): ?Curso
{
return $this->curso;
}
public function setCurso(?Curso $curso): self
{
$this->curso = $curso;
return $this;
}
public function getMaestro(): ?Maestro
{
return $this->maestro;
}
public function setMaestro(?Maestro $maestro): self
{
$this->maestro = $maestro;
return $this;
}
public function getEstudiante(): ?Estudiante
{
return $this->estudiante;
}
public function setEstudiante(?Estudiante $estudiante): self
{
$this->estudiante = $estudiante;
return $this;
}
public function getSuscripcion(): ?PagoSubscripcion
{
return $this->suscripcion;
}
public function setSuscripcion(?PagoSubscripcion $pagoSubscripcion): self
{
$this->suscripcion = $pagoSubscripcion;
return $this;
}
public function getFechaPago(): ?\DateTimeInterface
{
return $this->fechaPago;
}
public function setFechaPago(\DateTimeInterface $fechaPago): self
{
$this->fechaPago = $fechaPago;
return $this;
}
public function getFechaExpiracion(): ?\DateTimeInterface
{
return $this->fechaExpiracion;
}
public function setFechaExpiracion(?\DateTimeInterface $fechaExpiracion): self
{
$this->fechaExpiracion = $fechaExpiracion;
return $this;
}
public function getMonto(): ?float
{
return $this->monto;
}
public function setMonto(?float $monto): self
{
$this->monto = $monto;
return $this;
}
public function getTipo(): ?string
{
return $this->tipo;
}
public function setTipo(string $tipo): self
{
$this->tipo = $tipo;
return $this;
}
public function getDetalles(): ?array
{
return $this->detalles;
}
public function setDetalles(?array $detalles): self
{
$this->detalles = $detalles;
return $this;
}
public function getEstado(): ?int
{
return $this->estado;
}
public function setEstado(?int $estado): self
{
$this->estado = $estado;
return $this;
}
public function getCybersourceTransLog(): ?CybersourceTransLog
{
return $this->cybersourceTransLog;
}
public function setCybersourceTransLog(CybersourceTransLog $cybersourceTransLog = null): self
{
$this->cybersourceTransLog = $cybersourceTransLog;
return $this;
}
}