src/Entity/Rate.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RateRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=RateRepository::class)
  7.  */
  8. class Rate
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime")
  18.      */
  19.     private $createdat;
  20.     /**
  21.      * @ORM\Column(type="integer", nullable=true)
  22.      */
  23.     private $grade;
  24.     /**
  25.      * @ORM\Column(type="text", nullable=true)
  26.      */
  27.     private $commentaire;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Subject::class, inversedBy="rates")
  30.      * @ORM\JoinColumn(nullable=false)
  31.      */
  32.     private $subject;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=IctusPharmacie::class, inversedBy="rates")
  35.      */
  36.     private $pharmacie;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity=User::class)
  39.      */
  40.     private $user;
  41.     /**
  42.      * @ORM\Column(type="text", nullable=true)
  43.      */
  44.     private $token;
  45.     public function __construct()
  46.     {
  47.         $this->createdat = new \DateTime();
  48.     }
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getCreatedat(): ?\DateTimeInterface
  54.     {
  55.         return $this->createdat;
  56.     }
  57.     public function setCreatedat(\DateTimeInterface $createdat): self
  58.     {
  59.         $this->createdat $createdat;
  60.         return $this;
  61.     }
  62.     public function getGrade(): ?int
  63.     {
  64.         return $this->grade;
  65.     }
  66.     public function setGrade(int $grade): self
  67.     {
  68.         $this->grade $grade;
  69.         return $this;
  70.     }
  71.     public function getCommentaire(): ?string
  72.     {
  73.         return $this->commentaire;
  74.     }
  75.     public function setCommentaire(?string $commentaire): self
  76.     {
  77.         $this->commentaire $commentaire;
  78.         return $this;
  79.     }
  80.     public function getSubject(): ?Subject
  81.     {
  82.         return $this->subject;
  83.     }
  84.     public function setSubject(?Subject $subject): self
  85.     {
  86.         $this->subject $subject;
  87.         return $this;
  88.     }
  89.     public function getPharmacie(): ?IctusPharmacie
  90.     {
  91.         return $this->pharmacie;
  92.     }
  93.     public function setPharmacie(?IctusPharmacie $pharmacie): self
  94.     {
  95.         $this->pharmacie $pharmacie;
  96.         return $this;
  97.     }
  98.     public function getUser(): ?User
  99.     {
  100.         return $this->user;
  101.     }
  102.     public function setUser(?User $user): self
  103.     {
  104.         $this->user $user;
  105.         return $this;
  106.     }
  107.     public function getToken(): ?string
  108.     {
  109.         return $this->token;
  110.     }
  111.     public function setToken(?string $token): self
  112.     {
  113.         $this->token $token;
  114.         return $this;
  115.     }
  116. }