<?php
namespace App\Entity;
use App\Repository\ReviewRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ReviewRepository::class)]
class Review
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $message = null;
#[ORM\Column]
private ?int $rating = null;
#[ORM\ManyToOne(inversedBy: 'reviews')]
#[ORM\JoinColumn(nullable: false)]
private ?Doctor $doctor = null;
#[ORM\ManyToOne(inversedBy: 'reviews')]
#[ORM\JoinColumn(nullable: false)]
private ?Patient $createdBy = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createAt = null;
public function getId(): ?int
{
return $this->id;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(string $message): static
{
$this->message = $message;
return $this;
}
public function getRating(): ?int
{
return $this->rating;
}
public function setRating(int $rating): static
{
$this->rating = $rating;
return $this;
}
public function getDoctor(): ?Doctor
{
return $this->doctor;
}
public function setDoctor(?Doctor $doctor): static
{
$this->doctor = $doctor;
return $this;
}
public function getCreatedBy(): ?Patient
{
return $this->createdBy;
}
public function setCreatedBy(?Patient $createdBy): static
{
$this->createdBy = $createdBy;
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->createAt;
}
public function setCreateAt(\DateTimeInterface $createAt): static
{
$this->createAt = $createAt;
return $this;
}
}