src/Entity/Rating.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Utils\ExtendedEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\RatingRepository")
  7.  */
  8. class Rating
  9. {
  10.     use ExtendedEntity;
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="float")
  19.      */
  20.     private $rating;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $author;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="ratings")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $owner;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getRating(): ?float
  36.     {
  37.         return $this->rating;
  38.     }
  39.     public function setRating(float $rating): self
  40.     {
  41.         $this->rating $rating;
  42.         return $this;
  43.     }
  44.     public function getAuthor(): ?Customer
  45.     {
  46.         return $this->author;
  47.     }
  48.     public function setAuthor(?Customer $author): self
  49.     {
  50.         $this->author $author;
  51.         return $this;
  52.     }
  53.     public function getOwner(): ?Customer
  54.     {
  55.         return $this->owner;
  56.     }
  57.     public function setOwner(?Customer $owner): self
  58.     {
  59.         $this->owner $owner;
  60.         return $this;
  61.     }
  62. }