vendor/croisiland/common-bundle/src/Entity/Amenity/ServiceAtmosphereAssociation.php line 22

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Amenity;
  4. use Croisiland\CommonBundle\Entity\Company\Atmosphere;
  5. use Croisiland\CommonBundle\Repository\Amenity\ServiceAtmosphereAssociationRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=ServiceAtmosphereAssociationRepository::class)
  9. *
  10. * @ORM\Table(
  11. * name="service_atmosphere",
  12. * uniqueConstraints={
  13. *
  14. * @ORM\UniqueConstraint(name="unique_constraint", columns={"service_id", "atmosphere_id"})
  15. * }
  16. * )
  17. */
  18. class ServiceAtmosphereAssociation
  19. {
  20. /**
  21. * @ORM\Id
  22. *
  23. * @ORM\GeneratedValue
  24. *
  25. * @ORM\Column(type="integer")
  26. */
  27. private ?int $id = null;
  28. /**
  29. * @ORM\ManyToOne(targetEntity=Service::class, inversedBy="serviceAtmosphereAssociations")
  30. *
  31. * @ORM\JoinColumn(nullable=true)
  32. */
  33. private ?Service $service = null;
  34. /**
  35. * @ORM\ManyToOne(targetEntity=Atmosphere::class, inversedBy="serviceAtmosphereAssociations")
  36. *
  37. * @ORM\JoinColumn(nullable=true)
  38. */
  39. private ?Atmosphere $atmosphere = null;
  40. public function getId(): ?int
  41. {
  42. return $this->id;
  43. }
  44. public function getService(): ?Service
  45. {
  46. return $this->service;
  47. }
  48. public function setService(?Service $service): self
  49. {
  50. $this->service = $service;
  51. return $this;
  52. }
  53. public function getAtmosphere(): ?Atmosphere
  54. {
  55. return $this->atmosphere;
  56. }
  57. public function setAtmosphere(?Atmosphere $atmosphere): self
  58. {
  59. $this->atmosphere = $atmosphere;
  60. return $this;
  61. }
  62. }