src/Entity/Feedbacks.php line 12

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