src/Products/NotificationsBundle/Entity/CheckupRelationship.php line 16

Open in your IDE?
  1. <?php
  2. namespace Products\NotificationsBundle\Entity;
  3. use Cms\TenantBundle\Entity\TenantedEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(
  7.  *     repositoryClass = "Products\NotificationsBundle\Doctrine\Repository\CheckupRelationshipRepository",
  8.  * )
  9.  * @ORM\Table(
  10.  *     name = "notis__checkup_relationship",
  11.  * )
  12.  */
  13. class CheckupRelationship extends TenantedEntity
  14. {
  15.     /**
  16.      * @var Checkup|null
  17.      *
  18.      * @ORM\ManyToOne(
  19.      *     targetEntity = "Products\NotificationsBundle\Entity\Checkup",
  20.      *     inversedBy = "relationships",
  21.      * )
  22.      * @ORM\JoinColumn(
  23.      *     name = "checkup",
  24.      *     referencedColumnName = "id",
  25.      *     nullable = false,
  26.      *     onDelete = "CASCADE",
  27.      * )
  28.      */
  29.     protected ?Checkup $checkup null;
  30.     /**
  31.      * @var ProfileRelationship|null
  32.      *
  33.      * @ORM\ManyToOne(
  34.      *     targetEntity = "Products\NotificationsBundle\Entity\ProfileRelationship",
  35.      * )
  36.      * @ORM\JoinColumn(
  37.      *     name = "relationship",
  38.      *     referencedColumnName = "id",
  39.      *     nullable = false,
  40.      *     onDelete = "CASCADE",
  41.      * )
  42.      */
  43.     protected ?ProfileRelationship $relationship null;
  44.     /**
  45.      * @return Checkup|null
  46.      */
  47.     public function getCheckup(): ?Checkup
  48.     {
  49.         return $this->checkup;
  50.     }
  51.     /**
  52.      * @param Checkup $checkup
  53.      * @return $this
  54.      */
  55.     public function setCheckup(Checkup $checkup): self
  56.     {
  57.         $this->checkup $checkup;
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return ProfileRelationship|null
  62.      */
  63.     public function getRelationship(): ?ProfileRelationship
  64.     {
  65.         return $this->relationship;
  66.     }
  67.     /**
  68.      * @param ProfileRelationship $relationship
  69.      * @return $this
  70.      */
  71.     public function setRelationship(ProfileRelationship $relationship): self
  72.     {
  73.         $this->relationship $relationship;
  74.         return $this;
  75.     }
  76. }