<?php
namespace App\Entity;
use App\Utils\ExtendedEntity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\RatingRepository")
*/
class Rating
{
use ExtendedEntity;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="float")
*/
private $rating;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Customer")
* @ORM\JoinColumn(nullable=false)
*/
private $author;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="ratings")
* @ORM\JoinColumn(nullable=false)
*/
private $owner;
public function getId(): ?int
{
return $this->id;
}
public function getRating(): ?float
{
return $this->rating;
}
public function setRating(float $rating): self
{
$this->rating = $rating;
return $this;
}
public function getAuthor(): ?Customer
{
return $this->author;
}
public function setAuthor(?Customer $author): self
{
$this->author = $author;
return $this;
}
public function getOwner(): ?Customer
{
return $this->owner;
}
public function setOwner(?Customer $owner): self
{
$this->owner = $owner;
return $this;
}
}