src/AppBundle/MainBundle/Entity/Orders_Suppliers_Transfers_Payout_Status.php line 126

Open in your IDE?
  1. <?php
  2. namespace App\AppBundle\MainBundle\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JsonSerializable;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * AddOns
  9.  *
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="orders_suppliers_transfers_payout_status")
  12.  * @ORM\HasLifecycleCallbacks()
  13.  */
  14. class Orders_Suppliers_Transfers_Payout_Status implements JsonSerializable
  15. {
  16.     /**
  17.      * @ORM\Column(type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var Orders_Suppliers_Transfers_Payout
  24.      * @ORM\ManyToOne(targetEntity="Orders_Suppliers_Transfers_Payout", inversedBy="order_supplier_transfers_payout_status")
  25.      * @ORM\JoinColumn(name="order_supplier_transfer_payout_id", referencedColumnName="id")
  26.      */
  27.     private $order_supplier_transfer_payout;
  28.     /**
  29.      * @ORM\Column(type="string", nullable=true)
  30.      * @Assert\NotBlank()
  31.      */
  32.     private $comment;
  33.     /**
  34.      * @ORM\Column(type="string", nullable=true)
  35.      * @Assert\NotBlank()
  36.      */
  37.     private $status;//BookingStatus Constants for Refund Status
  38.     /**
  39.      * @return mixed
  40.      */
  41.     public function getId()
  42.     {
  43.         return $this->id;
  44.     }
  45.     /**
  46.      * @return Orders_Suppliers_Transfers_Payout
  47.      */
  48.     public function getOrderSupplierTransferPayout()
  49.     {
  50.         return $this->order_supplier_transfer_payout;
  51.     }
  52.     /**
  53.      * @param Orders_Suppliers_Transfers_Payout $order_supplier_transfer_payout
  54.      */
  55.     public function setOrderSupplierTransferPayout(Orders_Suppliers_Transfers_Payout $order_supplier_transfer_payout)
  56.     {
  57.         $this->order_supplier_transfer_payout $order_supplier_transfer_payout;
  58.     }
  59.     /**
  60.      * @return mixed
  61.      */
  62.     public function getComment()
  63.     {
  64.         return $this->comment;
  65.     }
  66.     /**
  67.      * @param mixed $comment
  68.      */
  69.     public function setComment($comment)
  70.     {
  71.         $this->comment $comment;
  72.     }
  73.     /**
  74.      * @return mixed
  75.      */
  76.     public function getStatus()
  77.     {
  78.         return $this->status;
  79.     }
  80.     /**
  81.      * @param mixed $status
  82.      */
  83.     public function setStatus($status)
  84.     {
  85.         $this->status $status;
  86.     }
  87.     public function jsonSerialize()
  88.     {
  89.         return array(
  90.             'id' => $this->id,
  91.             'order_supplier_transfer_payout_id' => $this->order_supplier_transfer_payout->getId(),
  92.             'comment' => $this->comment,
  93.             'status' => $this->status,
  94.             'created' => $this->createdAt->format('Y-m-d H:i:s'),
  95.             'updated' => $this->updatedAt->format('Y-m-d H:i:s'),
  96.         );
  97.     }
  98.     /**
  99.      * @var DateTime $created
  100.      *
  101.      * @ORM\Column(type="datetime", nullable=false)
  102.      */
  103.     protected $createdAt;
  104.     /**
  105.      * @var DateTime $updated
  106.      *
  107.      * @ORM\Column(type="datetime", nullable=false)
  108.      */
  109.     protected $updatedAt;
  110.     /**
  111.      * @return DateTime
  112.      */
  113.     public function getCreatedAt()
  114.     {
  115.         return $this->createdAt;
  116.     }
  117.     /**
  118.      * @return DateTime
  119.      */
  120.     public function getUpdatedAt()
  121.     {
  122.         return $this->updatedAt;
  123.     }
  124.     public function setUpdatedAt($updatedAt)
  125.     {
  126.         $this->updatedAt $updatedAt;
  127.         return $this;
  128.     }
  129.     /**
  130.      * @ORM\PrePersist
  131.      */
  132.     public function setCreatedAt()
  133.     {
  134.         $this->createdAt = new DateTime();
  135.         $this->updatedAt = new DateTime();
  136.         return $this;
  137.     }
  138.     /**
  139.      * @ORM\PreUpdate
  140.      */
  141.     public function setUpdatedAtValue() {
  142.         $this->updatedAt = new DateTime();
  143.     }
  144.     public function __construct() {
  145.     }
  146. }