src/Entity/PurchaseHistory.php line 12

Open in your IDE?
  1. <?php
  2.     namespace App\Entity;
  3.     use App\Repository\PurchaseHistoryRepository;
  4.     use App\Traits\DateTrait;
  5.     use Doctrine\ORM\Mapping as ORM;
  6.     /**
  7.      * @ORM\Entity(repositoryClass=PurchaseHistoryRepository::class)
  8.      */
  9.     class PurchaseHistory
  10.     {
  11.         /**
  12.          * @ORM\Id
  13.          * @ORM\GeneratedValue
  14.          * @ORM\Column(type="integer")
  15.          */
  16.         private $id;
  17.         /**
  18.          * @ORM\ManyToOne(targetEntity=Purchase::class, inversedBy="purchaseHistories")
  19.          * @ORM\JoinColumn(onDelete="SET NULL")
  20.          */
  21.         private $purchase;
  22.         /**
  23.          * @ORM\Column(type="integer")
  24.          */
  25.         private $value;
  26.         /**
  27.          * @ORM\Column(type="string", length=255)
  28.          */
  29.         private $reason;
  30.         use DateTrait;
  31.         public function getId(): ?int
  32.         {
  33.             return $this->id;
  34.         }
  35.         public function getPurchase(): ?Purchase
  36.         {
  37.             return $this->purchase;
  38.         }
  39.         public function setPurchase( ?Purchase $purchase ): self
  40.         {
  41.             $this->purchase $purchase;
  42.             return $this;
  43.         }
  44.         public function getValue(): ?int
  45.         {
  46.             return $this->value;
  47.         }
  48.         public function setValueint $value ): self
  49.         {
  50.             $this->value $value;
  51.             return $this;
  52.         }
  53.         public function getReason(): ?string
  54.         {
  55.             return $this->reason;
  56.         }
  57.         public function setReasonstring $reason ): self
  58.         {
  59.             $this->reason $reason;
  60.             return $this;
  61.         }
  62.     }