src/AppBundle/Entity/TransaccionDecidir.php line 14

  1. <?php
  2. namespace AppBundle\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Table(name="decidir_transaction")
  8.  * @ORM\Entity(repositoryClass="AppBundle\Repository\TransaccionDecidirRepository")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class TransaccionDecidir
  12. {
  13.     /**
  14.      * @ORM\Column(name="transaction_id",type="string",length=40)
  15.      * @ORM\Id
  16.      * @Assert\NotBlank()
  17.      */
  18.     protected $transactionId;
  19.     /**
  20.      * @ORM\Column(name="payment_id",type="string",length=40)
  21.      * @Assert\NotBlank()
  22.      */
  23.     protected $paymentId;
  24.     /**
  25.      * @ORM\Column(name="documento",type="string",length=64)
  26.      * @Assert\NotBlank()
  27.      */
  28.     protected $documento;
  29.     /**
  30.      * @ORM\Column(name="response_status",type="string",length=255)
  31.      * @Assert\NotBlank()
  32.      */
  33.     protected $responseStatus;
  34.     /**
  35.      * @ORM\Column(name="raw_response",type="string",length=255)
  36.      * @Assert\NotBlank()
  37.      */
  38.     protected $rawResponse;
  39.     /**
  40.      * @var \DateTime
  41.      *
  42.      * @ORM\Column(name="created_at", type="datetime")
  43.      * @Assert\NotBlank()
  44.      */
  45.     protected $createdAt;
  46.     /**
  47.      * @var \DateTime
  48.      *
  49.      * @ORM\Column(name="synchronized_at", type="datetime")
  50.      * @Assert\NotBlank()
  51.      */
  52.     protected $synchronizedAt;
  53.     /**
  54.      * @var \DateTime
  55.      *
  56.      * @ORM\Column(name="refunded_at", type="datetime")
  57.      * @Assert\NotBlank()
  58.      */
  59.     protected $refundedAt;
  60.     public function __construct($transactionId$paymentId null$documento null$responseStatus null$rawResponse null)
  61.     {
  62.         $this->transactionId $transactionId;
  63.         $this->paymentId $paymentId;
  64.         $this->documento $documento;
  65.         $this->responseStatus $responseStatus;
  66.         $this->rawResponse $rawResponse;
  67.     }
  68.     public function getId()
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function setId($id)
  73.     {
  74.         $this->id $id;
  75.     }
  76.     public function getPaymentId()
  77.     {
  78.         return $this->paymentId;
  79.     }
  80.     public function setPaymentId($paymentId)
  81.     {
  82.         $this->paymentId $paymentId;
  83.     }
  84.     public function getTransactionId()
  85.     {
  86.         return $this->transactionId;
  87.     }
  88.     public function setTransactionId($transactionId)
  89.     {
  90.         $this->transactionId $transactionId;
  91.     }
  92.     public function getDocumento()
  93.     {
  94.         return $this->documento;
  95.     }
  96.     public function setDocumento($documento)
  97.     {
  98.         $this->documento $documento;
  99.     }
  100.     public function getResponseStatus()
  101.     {
  102.         return $this->responseStatus;
  103.     }
  104.     public function setResponseStatus($responseStatus)
  105.     {
  106.         $this->responseStatus $responseStatus;
  107.     }
  108.     public function getRawResponse()
  109.     {
  110.         return $this->rawResponse;
  111.     }
  112.     public function setRawResponse($rawResponse)
  113.     {
  114.         $this->rawResponse $rawResponse;
  115.     }
  116.     public function getCreatedAt()
  117.     {
  118.         return $this->createdAt;
  119.     }
  120.     public function setCreatedAt($createdAt)
  121.     {
  122.         $this->createdAt $createdAt;
  123.     }
  124.     public function getSynchronizedAt()
  125.     {
  126.         return $this->synchronizedAt;
  127.     }
  128.     public function setSynchronizedAt($synchronizedAt)
  129.     {
  130.         $this->synchronizedAt $synchronizedAt;
  131.     }
  132.     public function getRefundedAt()
  133.     {
  134.         return $this->refundedAt;
  135.     }
  136.     public function setRefundedAt($refundedAt)
  137.     {
  138.         $this->refundedAt $refundedAt;
  139.     }
  140.     /**
  141.      * @ORM\PrePersist
  142.      * @ORM\PreUpdate
  143.      */
  144.     public function updatedTimestamps(): void
  145.     {
  146.         $dateTimeNow = new DateTime('now');
  147.         if ($this->getCreatedAt() === null) {
  148.             $this->setCreatedAt($dateTimeNow);
  149.         }
  150.     }
  151. }