src/Entity/Experience.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ExperienceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation as Serializer;
  6. /**
  7. * @ORM\Entity(repositoryClass=ExperienceRepository::class)
  8. * @Serializer\ExclusionPolicy("ALL")
  9. */
  10. class Experience
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. * @Serializer\Expose
  17. * @Serializer\Groups({"user_profile"})
  18. */
  19. private $id;
  20. /**
  21. * @ORM\Column(type="string", length=255)
  22. * @Serializer\Expose
  23. * @Serializer\Groups({"user_profile"})
  24. */
  25. private $title;
  26. /**
  27. * @ORM\Column(type="datetime")
  28. * @Serializer\Expose
  29. * @Serializer\Groups({"user_profile"})
  30. */
  31. private $startAt;
  32. /**
  33. * @ORM\Column(type="datetime", nullable=true)
  34. * @Serializer\Expose
  35. * @Serializer\Groups({"user_profile"})
  36. */
  37. private $endAt;
  38. /**
  39. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userExperiences")
  40. * @ORM\JoinColumn(nullable=false)
  41. */
  42. private $user;
  43. /**
  44. * @ORM\Column(type="boolean", nullable=true)
  45. * @Serializer\Expose
  46. * @Serializer\Groups({"user_profile"})
  47. */
  48. private $isCofinaExperience = true;
  49. public function getId(): ?int
  50. {
  51. return $this->id;
  52. }
  53. public function getTitle(): ?string
  54. {
  55. return $this->title;
  56. }
  57. public function setTitle(string $title): self
  58. {
  59. $this->title = $title;
  60. return $this;
  61. }
  62. public function getStartAt(): ?\DateTimeInterface
  63. {
  64. return $this->startAt;
  65. }
  66. public function setStartAt(\DateTimeInterface $startAt): self
  67. {
  68. $this->startAt = $startAt;
  69. return $this;
  70. }
  71. public function getEndAt(): ?\DateTimeInterface
  72. {
  73. return $this->endAt;
  74. }
  75. public function setEndAt(?\DateTimeInterface $endAt): self
  76. {
  77. $this->endAt = $endAt;
  78. return $this;
  79. }
  80. public function getUser(): ?User
  81. {
  82. return $this->user;
  83. }
  84. public function setUser(?User $user): self
  85. {
  86. $this->user = $user;
  87. return $this;
  88. }
  89. public function isIsCofinaExperience(): ?bool
  90. {
  91. return $this->isCofinaExperience;
  92. }
  93. public function setIsCofinaExperience(?bool $isCofinaExperience): self
  94. {
  95. $this->isCofinaExperience = $isCofinaExperience;
  96. return $this;
  97. }
  98. }