src/AppBundle/Entity/TransaccionDecidir.php line 14
<?php
namespace AppBundle\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="decidir_transaction")
* @ORM\Entity(repositoryClass="AppBundle\Repository\TransaccionDecidirRepository")
* @ORM\HasLifecycleCallbacks()
*/
class TransaccionDecidir
{
/**
* @ORM\Column(name="transaction_id",type="string",length=40)
* @ORM\Id
* @Assert\NotBlank()
*/
protected $transactionId;
/**
* @ORM\Column(name="payment_id",type="string",length=40)
* @Assert\NotBlank()
*/
protected $paymentId;
/**
* @ORM\Column(name="documento",type="string",length=64)
* @Assert\NotBlank()
*/
protected $documento;
/**
* @ORM\Column(name="response_status",type="string",length=255)
* @Assert\NotBlank()
*/
protected $responseStatus;
/**
* @ORM\Column(name="raw_response",type="string",length=255)
* @Assert\NotBlank()
*/
protected $rawResponse;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime")
* @Assert\NotBlank()
*/
protected $createdAt;
/**
* @var \DateTime
*
* @ORM\Column(name="synchronized_at", type="datetime")
* @Assert\NotBlank()
*/
protected $synchronizedAt;
/**
* @var \DateTime
*
* @ORM\Column(name="refunded_at", type="datetime")
* @Assert\NotBlank()
*/
protected $refundedAt;
public function __construct($transactionId, $paymentId = null, $documento = null, $responseStatus = null, $rawResponse = null)
{
$this->transactionId = $transactionId;
$this->paymentId = $paymentId;
$this->documento = $documento;
$this->responseStatus = $responseStatus;
$this->rawResponse = $rawResponse;
}
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
public function getPaymentId()
{
return $this->paymentId;
}
public function setPaymentId($paymentId)
{
$this->paymentId = $paymentId;
}
public function getTransactionId()
{
return $this->transactionId;
}
public function setTransactionId($transactionId)
{
$this->transactionId = $transactionId;
}
public function getDocumento()
{
return $this->documento;
}
public function setDocumento($documento)
{
$this->documento = $documento;
}
public function getResponseStatus()
{
return $this->responseStatus;
}
public function setResponseStatus($responseStatus)
{
$this->responseStatus = $responseStatus;
}
public function getRawResponse()
{
return $this->rawResponse;
}
public function setRawResponse($rawResponse)
{
$this->rawResponse = $rawResponse;
}
public function getCreatedAt()
{
return $this->createdAt;
}
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
}
public function getSynchronizedAt()
{
return $this->synchronizedAt;
}
public function setSynchronizedAt($synchronizedAt)
{
$this->synchronizedAt = $synchronizedAt;
}
public function getRefundedAt()
{
return $this->refundedAt;
}
public function setRefundedAt($refundedAt)
{
$this->refundedAt = $refundedAt;
}
/**
* @ORM\PrePersist
* @ORM\PreUpdate
*/
public function updatedTimestamps(): void
{
$dateTimeNow = new DateTime('now');
if ($this->getCreatedAt() === null) {
$this->setCreatedAt($dateTimeNow);
}
}
}