src/Entity/System/RefundLine.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\System\RefundLineRepository")
  6.  *
  7.  * @ORM\Table(
  8.  *              uniqueConstraints={
  9.  *
  10.  *                  @ORM\UniqueConstraint(name="uk_order_detail_refund", columns={"refund_id", "order_detail_id"})
  11.  *              }
  12.  *        )
  13.  */
  14. class RefundLine
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Id
  20.      *
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      *
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var \DateTime
  28.      *
  29.      * @ORM\Column(type="datetime")
  30.      */
  31.     private $dateAdd;
  32.     /**
  33.      * @var Refund
  34.      *
  35.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Refund", inversedBy="refundLines")
  36.      *
  37.      * @ORM\JoinColumn(nullable=false)
  38.      */
  39.     private $refund;
  40.     /**
  41.      * @var OrderDetail
  42.      *
  43.      * @ORM\ManyToOne(targetEntity="App\Entity\System\OrderDetail", inversedBy="refundLines")
  44.      *
  45.      * @ORM\JoinColumn(referencedColumnName="id_order_detail", nullable=false)
  46.      */
  47.     private $orderDetail;
  48.     /**
  49.      * @var int
  50.      *
  51.      * @ORM\Column(type="integer", nullable=false)
  52.      */
  53.     private $quantity;
  54.     public function __construct()
  55.     {
  56.         $this->dateAdd = new \DateTime();
  57.     }
  58.     public function getId(): int
  59.     {
  60.         return $this->id;
  61.     }
  62.     public function setId(int $id): RefundLine
  63.     {
  64.         $this->id $id;
  65.         return $this;
  66.     }
  67.     public function getDateAdd(): \DateTime
  68.     {
  69.         return $this->dateAdd;
  70.     }
  71.     public function setDateAdd(\DateTime $dateAdd): RefundLine
  72.     {
  73.         $this->dateAdd $dateAdd;
  74.         return $this;
  75.     }
  76.     public function getOrderDetail(): OrderDetail
  77.     {
  78.         return $this->orderDetail;
  79.     }
  80.     public function setOrderDetail(OrderDetail $orderDetail): RefundLine
  81.     {
  82.         $this->orderDetail $orderDetail;
  83.         return $this;
  84.     }
  85.     public function getQuantity(): int
  86.     {
  87.         return $this->quantity;
  88.     }
  89.     public function setQuantity(int $quantity): RefundLine
  90.     {
  91.         $this->quantity $quantity;
  92.         return $this;
  93.     }
  94.     public function getRefund(): Refund
  95.     {
  96.         return $this->refund;
  97.     }
  98.     public function setRefund(Refund $refund): RefundLine
  99.     {
  100.         $this->refund $refund;
  101.         return $this;
  102.     }
  103. }