src/Entity/ContactComment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactCommentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=ContactCommentRepository::class)
  7. */
  8. class ContactComment
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(type="text", nullable=true)
  18. */
  19. private $comment;
  20. /**
  21. * @ORM\ManyToOne(targetEntity=User::class)
  22. * @ORM\JoinColumn(nullable=false)
  23. */
  24. private $user;
  25. /**
  26. * @ORM\ManyToOne(targetEntity=Contact::class, inversedBy="contactComments")
  27. */
  28. private $contact;
  29. /**
  30. * @ORM\Column(type="datetime")
  31. */
  32. private $createdDate;
  33. /**
  34. * @ORM\ManyToOne(targetEntity=Enterprise::class, inversedBy="contactComments")
  35. */
  36. private $enterprise;
  37. public function __construct()
  38. {
  39. $this->createdDate = new \Datetime();
  40. }
  41. public function getId(): ?int
  42. {
  43. return $this->id;
  44. }
  45. public function getComment(): ?string
  46. {
  47. return $this->comment;
  48. }
  49. public function setComment(?string $comment): self
  50. {
  51. $this->comment = $comment;
  52. return $this;
  53. }
  54. public function getUser(): ?User
  55. {
  56. return $this->user;
  57. }
  58. public function setUser(?User $user): self
  59. {
  60. $this->user = $user;
  61. return $this;
  62. }
  63. public function getContact(): ?Contact
  64. {
  65. return $this->contact;
  66. }
  67. public function setContact(?Contact $contact): self
  68. {
  69. $this->contact = $contact;
  70. return $this;
  71. }
  72. public function getCreatedDate(): ?\DateTimeInterface
  73. {
  74. return $this->createdDate;
  75. }
  76. public function setCreatedDate(\DateTimeInterface $createdDate): self
  77. {
  78. $this->createdDate = $createdDate;
  79. return $this;
  80. }
  81. public function getEnterprise(): ?Enterprise
  82. {
  83. return $this->enterprise;
  84. }
  85. public function setEnterprise(?Enterprise $enterprise): self
  86. {
  87. $this->enterprise = $enterprise;
  88. return $this;
  89. }
  90. }