src/Entity/UserVouchers.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserVouchersRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=UserVouchersRepository::class)
  8.  */
  9. class UserVouchers
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups("vouchers:read")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="userVouchers")
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $user;
  23.     /**
  24.      * @ORM\Column(type="integer")
  25.      * @Groups("vouchers:read")
  26.      */
  27.     private $voucher_points;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Partners::class, inversedBy="userVouchers")
  30.      * @ORM\JoinColumn(nullable=false)
  31.      * @Groups("with_partner")
  32.      */
  33.     private $partner;
  34.     /**
  35.      * @ORM\Column(type="string", length=255)
  36.      * @Groups("vouchers:read")
  37.      */
  38.     private $voucher_unique;
  39.     /**
  40.      * @ORM\Column(type="datetime_immutable", nullable=true)
  41.      * @Groups("vouchers:read")
  42.      */
  43.     private $validated_at;
  44.     /**
  45.      * @ORM\Column(type="datetime_immutable")
  46.      * @Groups("vouchers:read")
  47.      */
  48.     private $created_at;
  49.     /**
  50.      * @ORM\Column(type="datetime_immutable", nullable=true)
  51.      */
  52.     private $deleted_at;
  53.     public function getId(): ?int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getUser(): ?Users
  58.     {
  59.         return $this->user;
  60.     }
  61.     public function setUser(?Users $user): self
  62.     {
  63.         $this->user $user;
  64.         return $this;
  65.     }
  66.     public function getVoucherPoints(): ?int
  67.     {
  68.         return $this->voucher_points;
  69.     }
  70.     public function setVoucherPoints(int $voucher_points): self
  71.     {
  72.         $this->voucher_points $voucher_points;
  73.         return $this;
  74.     }
  75.     public function getPartner(): ?Partners
  76.     {
  77.         return $this->partner;
  78.     }
  79.     public function setPartner(?Partners $partner): self
  80.     {
  81.         $this->partner $partner;
  82.         return $this;
  83.     }
  84.     public function getVoucherUnique(): ?string
  85.     {
  86.         return $this->voucher_unique;
  87.     }
  88.     public function setVoucherUnique(string $voucher_unique): self
  89.     {
  90.         $this->voucher_unique $voucher_unique;
  91.         return $this;
  92.     }
  93.     public function getValidatedAt(): ?\DateTimeImmutable
  94.     {
  95.         return $this->validated_at;
  96.     }
  97.     public function setValidatedAt(?\DateTimeImmutable $validated_at): self
  98.     {
  99.         $this->validated_at $validated_at;
  100.         return $this;
  101.     }
  102.     public function getCreatedAt(): ?\DateTimeImmutable
  103.     {
  104.         return $this->created_at;
  105.     }
  106.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  107.     {
  108.         $this->created_at $created_at;
  109.         return $this;
  110.     }
  111.     public function getDeletedAt(): ?\DateTimeImmutable
  112.     {
  113.         return $this->deleted_at;
  114.     }
  115.     public function setDeletedAt(?\DateTimeImmutable $deleted_at): self
  116.     {
  117.         $this->deleted_at $deleted_at;
  118.         return $this;
  119.     }
  120. }