src/Admin/Modules/Voucher/Entity/VoucherPackageVoucherNote.php line 14

  1. <?php
  2. namespace App\Admin\Modules\Voucher\Entity;
  3. use App\Modules\User\Entity\User;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. /**
  8.  * @ORM\Table(name="voucher_package_voucher_note", indexes={@ORM\Index(columns={"added_at"})})
  9.  * @ORM\Entity
  10.  */
  11. class VoucherPackageVoucherNote
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Id
  17.      * @ORM\Column(type="bigint", options={"unsigned"=true}))
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     protected $id;
  21.     
  22.     /**
  23.      * @var \App\Admin\Modules\Voucher\Entity\VoucherPackageVoucher
  24.      *
  25.      * @ORM\ManyToOne(targetEntity="App\Admin\Modules\Voucher\Entity\VoucherPackageVoucher", inversedBy="notes")
  26.      * @ORM\JoinColumns({
  27.      *   @ORM\JoinColumn(name="id_voucher_package_voucher", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  28.      * })
  29.      */
  30.     private $voucher;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(name="note", type="text", length=65535, nullable=true)
  35.      */
  36.     protected $note;
  37.     
  38.     /**
  39.      * @var \App\Modules\User\Entity\User
  40.      *
  41.      * @ORM\ManyToOne(targetEntity="App\Modules\User\Entity\User")
  42.      * @ORM\JoinColumns({
  43.      *   @ORM\JoinColumn(name="id_added_by_user", referencedColumnName="id", nullable=true, onDelete="SET NULL")
  44.      * })
  45.      */
  46.     private $addedByUser;     
  47.     /**
  48.      * @var \DateTime
  49.      *
  50.      * @ORM\Column(name="added_at", type="datetime", nullable=false)
  51.      * @Gedmo\Timestampable(on="create")
  52.      */
  53.     private $addedAt;
  54.     public function getId(): ?string
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getNote(): ?string
  59.     {
  60.         return $this->note;
  61.     }
  62.     public function setNote(?string $note): self
  63.     {
  64.         $this->note $note;
  65.         return $this;
  66.     }
  67.     public function getAddedAt(): ?\DateTimeInterface
  68.     {
  69.         return $this->addedAt;
  70.     }
  71.     public function setAddedAt(\DateTimeInterface $addedAt): self
  72.     {
  73.         $this->addedAt $addedAt;
  74.         return $this;
  75.     }
  76.     public function getVoucher(): ?VoucherPackageVoucher
  77.     {
  78.         return $this->voucher;
  79.     }
  80.     public function setVoucher(?VoucherPackageVoucher $voucher): self
  81.     {
  82.         $this->voucher $voucher;
  83.         return $this;
  84.     }
  85.     public function getAddedByUser(): ?User
  86.     {
  87.         return $this->addedByUser;
  88.     }
  89.     public function setAddedByUser(?User $addedByUser): self
  90.     {
  91.         $this->addedByUser $addedByUser;
  92.         return $this;
  93.     }
  94. }