src/Entity/UserClinic.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Traits\CreatedUpdatedTrait;
  5. use JMS\Serializer\Annotation\Expose;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. use JMS\Serializer\Annotation\ExclusionPolicy;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Sonata\TranslationBundle\Model\Gedmo\TranslatableInterface;
  10. use Sonata\TranslationBundle\Model\Gedmo\AbstractPersonalTranslatable;
  11. /**
  12.  * @ORM\Table(name="v_user_clinic")
  13.  * @ORM\Entity(repositoryClass="App\Repository\UserClinicRepository")
  14.  * @ExclusionPolicy("all")
  15.  * @Gedmo\Loggable
  16.  */
  17. class UserClinic
  18. {
  19.     /**
  20.      * @ORM\Id()
  21.      * @ORM\GeneratedValue()
  22.      * @ORM\Column(type="integer")
  23.      * @Expose
  24.      */
  25.     private $id;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity="App\Entity\User", cascade={"persist"}, inversedBy="clinics")
  28.      * @Expose
  29.      */
  30.     private $user;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\Clinic")
  33.      * @Expose
  34.      * @Gedmo\Versioned
  35.      */
  36.     private $clinic;
  37.     /**
  38.      * @ORM\Column(name="clinic_code", type="string", length=255, nullable=true)
  39.      * @Expose
  40.      * @Gedmo\Versioned
  41.      */
  42.     private $clinicCode;
  43.     use CreatedUpdatedTrait;
  44.     public function __toString()
  45.     {
  46.         return (string) $this->id;
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     /**
  53.      * @return mixed
  54.      */
  55.     public function getUser()
  56.     {
  57.         return $this->user;
  58.     }
  59.     /**
  60.      * @param mixed $user
  61.      */
  62.     public function setUser($user): void
  63.     {
  64.         $this->user $user;
  65.     }
  66.     /**
  67.      * @return mixed
  68.      */
  69.     public function getClinic()
  70.     {
  71.         return $this->clinic;
  72.     }
  73.     /**
  74.      * @param mixed $clinic
  75.      */
  76.     public function setClinic($clinic): void
  77.     {
  78.         $this->clinic $clinic;
  79.     }
  80.     /**
  81.      * @return mixed
  82.      */
  83.     public function getClinicCode()
  84.     {
  85.         return $this->clinicCode;
  86.     }
  87.     /**
  88.      * @param mixed $clinicCode
  89.      */
  90.     public function setClinicCode($clinicCode): void
  91.     {
  92.         $this->clinicCode $clinicCode;
  93.     }
  94. }