src/Entity/UserPointsHistory.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserPointsHistoryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=UserPointsHistoryRepository::class)
  7.  */
  8. class UserPointsHistory
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="userPointsHistories")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      * @ORM\JoinColumn(onDelete="CASCADE")
  20.      */
  21.     private $user;
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $points;
  26.     /**
  27.      * @ORM\Column(type="datetime_immutable")
  28.      */
  29.     private $created_at;
  30.     /**
  31.      * @ORM\Column(type="datetime_immutable", nullable=true)
  32.      */
  33.     private $deleted_at;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=Rewards::class, inversedBy="userPointsHistories")
  36.      */
  37.     private $reward;
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getUser(): ?Users
  43.     {
  44.         return $this->user;
  45.     }
  46.     public function setUser(?Users $user): self
  47.     {
  48.         $this->user $user;
  49.         return $this;
  50.     }
  51.     public function getPoints(): ?int
  52.     {
  53.         return $this->points;
  54.     }
  55.     public function setPoints(int $points): self
  56.     {
  57.         $this->points $points;
  58.         return $this;
  59.     }
  60.     public function getCreatedAt(): ?\DateTimeImmutable
  61.     {
  62.         return $this->created_at;
  63.     }
  64.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  65.     {
  66.         $this->created_at $created_at;
  67.         return $this;
  68.     }
  69.     public function getDeletedAt(): ?\DateTimeImmutable
  70.     {
  71.         return $this->deleted_at;
  72.     }
  73.     public function setDeletedAt(?\DateTimeImmutable $deleted_at): self
  74.     {
  75.         $this->deleted_at $deleted_at;
  76.         return $this;
  77.     }
  78.     public function getReward(): ?Rewards
  79.     {
  80.         return $this->reward;
  81.     }
  82.     public function setReward(?Rewards $reward): self
  83.     {
  84.         $this->reward $reward;
  85.         return $this;
  86.     }
  87. }