<?php
namespace App\AppBundle\MainBundle\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
use Symfony\Component\Validator\Constraints as Assert;
/**
* AddOns
*
* @ORM\Entity
* @ORM\Table(name="orders_suppliers_transfers_payout_status")
* @ORM\HasLifecycleCallbacks()
*/
class Orders_Suppliers_Transfers_Payout_Status implements JsonSerializable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var Orders_Suppliers_Transfers_Payout
* @ORM\ManyToOne(targetEntity="Orders_Suppliers_Transfers_Payout", inversedBy="order_supplier_transfers_payout_status")
* @ORM\JoinColumn(name="order_supplier_transfer_payout_id", referencedColumnName="id")
*/
private $order_supplier_transfer_payout;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $comment;
/**
* @ORM\Column(type="string", nullable=true)
* @Assert\NotBlank()
*/
private $status;//BookingStatus Constants for Refund Status
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return Orders_Suppliers_Transfers_Payout
*/
public function getOrderSupplierTransferPayout()
{
return $this->order_supplier_transfer_payout;
}
/**
* @param Orders_Suppliers_Transfers_Payout $order_supplier_transfer_payout
*/
public function setOrderSupplierTransferPayout(Orders_Suppliers_Transfers_Payout $order_supplier_transfer_payout)
{
$this->order_supplier_transfer_payout = $order_supplier_transfer_payout;
}
/**
* @return mixed
*/
public function getComment()
{
return $this->comment;
}
/**
* @param mixed $comment
*/
public function setComment($comment)
{
$this->comment = $comment;
}
/**
* @return mixed
*/
public function getStatus()
{
return $this->status;
}
/**
* @param mixed $status
*/
public function setStatus($status)
{
$this->status = $status;
}
public function jsonSerialize()
{
return array(
'id' => $this->id,
'order_supplier_transfer_payout_id' => $this->order_supplier_transfer_payout->getId(),
'comment' => $this->comment,
'status' => $this->status,
'created' => $this->createdAt->format('Y-m-d H:i:s'),
'updated' => $this->updatedAt->format('Y-m-d H:i:s'),
);
}
/**
* @var DateTime $created
*
* @ORM\Column(type="datetime", nullable=false)
*/
protected $createdAt;
/**
* @var DateTime $updated
*
* @ORM\Column(type="datetime", nullable=false)
*/
protected $updatedAt;
/**
* @return DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* @return DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist
*/
public function setCreatedAt()
{
$this->createdAt = new DateTime();
$this->updatedAt = new DateTime();
return $this;
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAtValue() {
$this->updatedAt = new DateTime();
}
public function __construct() {
}
}