<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\CustomerReviewRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CustomerReviewRepository::class)
* @ORM\Table(
* name="customer_reviews",
* uniqueConstraints={
* @ORM\UniqueConstraint(name="UNIQ_customer_reviews_review_id", columns={"review_id"})
* }
* )
*/
class CustomerReview
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\Column(name="review_id", type="string", length=255, unique=true)
*/
private string $reviewId;
/**
* @ORM\Column(name="reviewer_profile_photo_url", type="string", length=2048, nullable=true)
*/
private ?string $reviewerProfilePhotoUrl = null;
/**
* @ORM\Column(name="reviewer_display_name", type="string", length=255, nullable=true)
*/
private ?string $reviewerDisplayName = null;
/**
* @ORM\Column(name="star_rating", type="decimal", precision=3, scale=2)
*/
private string $starRating;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $comment = null;
/**
* @ORM\Column(name="create_time", type="datetime_immutable")
*/
private \DateTimeImmutable $createTime;
/**
* @ORM\Column(name="update_time", type="datetime_immutable")
*/
private \DateTimeImmutable $updateTime;
/**
* @ORM\Column(name="review_reply_comment", type="text", nullable=true)
*/
private ?string $reviewReplyComment = null;
/**
* @ORM\Column(name="review_reply_update_time", type="datetime_immutable", nullable=true)
*/
private ?\DateTimeImmutable $reviewReplyUpdateTime = null;
/**
* @ORM\Column(type="string", length=512)
*/
private string $name;
public function __construct(
string $reviewId,
string $name,
string $starRating,
\DateTimeImmutable $createTime,
\DateTimeImmutable $updateTime,
) {
$this->reviewId = $reviewId;
$this->name = $name;
$this->starRating = $starRating;
$this->createTime = $createTime;
$this->updateTime = $updateTime;
}
public function getId(): ?int
{
return $this->id;
}
public function getReviewId(): string
{
return $this->reviewId;
}
public function getReviewerProfilePhotoUrl(): ?string
{
return $this->reviewerProfilePhotoUrl;
}
public function setReviewerProfilePhotoUrl(?string $reviewerProfilePhotoUrl): self
{
$this->reviewerProfilePhotoUrl = $reviewerProfilePhotoUrl;
return $this;
}
public function getReviewerDisplayName(): ?string
{
return $this->reviewerDisplayName;
}
public function setReviewerDisplayName(?string $reviewerDisplayName): self
{
$this->reviewerDisplayName = $reviewerDisplayName;
return $this;
}
public function getStarRating(): string
{
return $this->starRating;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getCreateTime(): \DateTimeImmutable
{
return $this->createTime;
}
public function getUpdateTime(): \DateTimeImmutable
{
return $this->updateTime;
}
public function getReviewReplyComment(): ?string
{
return $this->reviewReplyComment;
}
public function setReviewReplyComment(?string $reviewReplyComment): self
{
$this->reviewReplyComment = $reviewReplyComment;
return $this;
}
public function getReviewReplyUpdateTime(): ?\DateTimeImmutable
{
return $this->reviewReplyUpdateTime;
}
public function setReviewReplyUpdateTime(?\DateTimeImmutable $reviewReplyUpdateTime): self
{
$this->reviewReplyUpdateTime = $reviewReplyUpdateTime;
return $this;
}
public function getName(): string
{
return $this->name;
}
}