<?php
namespace App\Entity;
use App\Repository\CustomerCommentRepository;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints\Date;
/**
* @ORM\Entity(repositoryClass=CustomerCommentRepository::class)
*/
class CustomerComment
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
private $displayNumber;
/**
* @ORM\Column(type="date")
*/
private $date;
/**
* @ORM\Column(type="date")
*/
private $commentAddDate;
/**
* @ORM\Column(type="string", length=16367)
*/
private $comment;
/**
* @ORM\ManyToOne(targetEntity=Customer::class, inversedBy="customerComments")
* @ORM\JoinColumn(nullable=false)
*/
private $customer;
public function getId(): ?int
{
return $this->id;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getCustomer(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
public function getDate(): DateTime
{
return $this->date;
}
public function getDateFormatted(): string
{
return $this->date->format('Y-m-d');
}
public function setDate(DateTime $date): self
{
$this->date = $date;
return $this;
}
/**
* @return mixed
*/
public function getCommentAddDate()
{
return $this->commentAddDate;
}
public function getCommentAddDateFormatted() : string
{
return $this->commentAddDate->format('Y-m-d');
}
public function setCommentAddDate($commentAddDate): self
{
$this->commentAddDate = $commentAddDate;
return $this;
}
/**
* @return mixed
*/
public function getDisplayNumber()
{
return $this->displayNumber;
}
/**
* @param mixed $displayNumber
*/
public function setDisplayNumber($displayNumber): void
{
$this->displayNumber = $displayNumber;
}
}