src/Entity/Email.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EmailRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * @ORM\Entity(repositoryClass=EmailRepository::class)
  10. */
  11. class Email
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\GeneratedValue
  16. * @ORM\Column(type="integer")
  17. */
  18. private $id;
  19. /**
  20. * @ORM\Column(type="string", length=255)
  21. */
  22. private $subject;
  23. /**
  24. * @ORM\Column(type="text")
  25. */
  26. private $content;
  27. /**
  28. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="emails")
  29. * @ORM\JoinColumn(nullable=false)
  30. */
  31. private $sender;
  32. public function __construct()
  33. {
  34. }
  35. public function getId(): ?int
  36. {
  37. return $this->id;
  38. }
  39. public function getSubject(): ?string
  40. {
  41. return $this->subject;
  42. }
  43. public function setSubject(string $subject): self
  44. {
  45. $this->subject = $subject;
  46. return $this;
  47. }
  48. public function getContent(): ?string
  49. {
  50. return $this->content;
  51. }
  52. public function setContent(string $content): self
  53. {
  54. $this->content = $content;
  55. return $this;
  56. }
  57. public function getSender(): ?User
  58. {
  59. return $this->sender;
  60. }
  61. public function setSender(?User $sender): self
  62. {
  63. $this->sender = $sender;
  64. return $this;
  65. }
  66. }