src/Entity/CustomerComment.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CustomerCommentRepository;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints\Date;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CustomerCommentRepository::class)
  9.  */
  10. class CustomerComment
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     private $displayNumber;
  19.     /**
  20.      * @ORM\Column(type="date")
  21.      */
  22.     private $date;
  23.     /**
  24.      * @ORM\Column(type="date")
  25.      */
  26.     private $commentAddDate;
  27.     /**
  28.      * @ORM\Column(type="string", length=16367)
  29.      */
  30.     private $comment;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=Customer::class, inversedBy="customerComments")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $customer;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getComment(): ?string
  41.     {
  42.         return $this->comment;
  43.     }
  44.     public function setComment(string $comment): self
  45.     {
  46.         $this->comment $comment;
  47.         return $this;
  48.     }
  49.     public function getCustomer(): ?Customer
  50.     {
  51.         return $this->customer;
  52.     }
  53.     public function setCustomer(?Customer $customer): self
  54.     {
  55.         $this->customer $customer;
  56.         return $this;
  57.     }
  58.     public function getDate(): DateTime
  59.     {
  60.         return $this->date;
  61.     }
  62.     public function getDateFormatted(): string
  63.     {
  64.         return $this->date->format('Y-m-d');
  65.     }
  66.     public function setDate(DateTime $date): self
  67.     {
  68.         $this->date $date;
  69.         return $this;
  70.     }
  71.     /**
  72.      * @return mixed
  73.      */
  74.     public function getCommentAddDate()
  75.     {
  76.         return $this->commentAddDate;
  77.     }
  78.     public function getCommentAddDateFormatted() : string
  79.     {
  80.         return $this->commentAddDate->format('Y-m-d');
  81.     }
  82.     public function setCommentAddDate($commentAddDate): self
  83.     {
  84.         $this->commentAddDate $commentAddDate;
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return mixed
  89.      */
  90.     public function getDisplayNumber()
  91.     {
  92.         return $this->displayNumber;
  93.     }
  94.     /**
  95.      * @param mixed $displayNumber
  96.      */
  97.     public function setDisplayNumber($displayNumber): void
  98.     {
  99.         $this->displayNumber $displayNumber;
  100.     }
  101. }