<?php
namespace App\Entity;
use App\Repository\RateRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=RateRepository::class)
*/
class Rate
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $createdat;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $grade;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $commentaire;
/**
* @ORM\ManyToOne(targetEntity=Subject::class, inversedBy="rates")
* @ORM\JoinColumn(nullable=false)
*/
private $subject;
/**
* @ORM\ManyToOne(targetEntity=IctusPharmacie::class, inversedBy="rates")
*/
private $pharmacie;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
private $user;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $token;
public function __construct()
{
$this->createdat = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedat(): ?\DateTimeInterface
{
return $this->createdat;
}
public function setCreatedat(\DateTimeInterface $createdat): self
{
$this->createdat = $createdat;
return $this;
}
public function getGrade(): ?int
{
return $this->grade;
}
public function setGrade(int $grade): self
{
$this->grade = $grade;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getSubject(): ?Subject
{
return $this->subject;
}
public function setSubject(?Subject $subject): self
{
$this->subject = $subject;
return $this;
}
public function getPharmacie(): ?IctusPharmacie
{
return $this->pharmacie;
}
public function setPharmacie(?IctusPharmacie $pharmacie): self
{
$this->pharmacie = $pharmacie;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): self
{
$this->token = $token;
return $this;
}
}