src\Entity\Patient.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PatientRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use JMS\Serializer\Annotation as Serializer;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  *
  9.  * @ORM\Entity(repositoryClass=PatientRepository::class)
  10.  * @ORM\Table(name = "neema.patient")
  11.  * @UniqueEntity("patient_id")
  12.  */
  13. class Patient
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=100)
  23.      */
  24.     private $patientName;
  25.     /**
  26.      * @ORM\Column(type="string", length=12)
  27.      */
  28.     private $phone;
  29.     /**
  30.      * @ORM\Column(type="string", length=100)
  31.      */
  32.     private $reason;
  33.     /**
  34.      * @ORM\Column(type="string", length=50)
  35.      */
  36.     private $location;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity=Branch::class)
  39.      * @ORM\JoinColumn(nullable=false)
  40.      */
  41.     private $branch;
  42.     /**
  43.      * @Serializer\Type("DateTime<'Y-m-d H:i:s'>")
  44.      * @ORM\Column(type="date")
  45.      */
  46.     private $appointment_date;
  47. //    /**
  48. //     * @Serializer\Type("DateTime<'Y-m-d H:i:s'>")
  49. //     * @ORM\Column(type="datetime")
  50. //     * 
  51. //     * @ORM\GeneratedValue
  52. //     */
  53. //    private $createdAt;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity=User::class)
  56.      * @ORM\JoinColumn(nullable=false)
  57.      */
  58.     private $user;
  59.     /**
  60.      * @ORM\Column(type="string",length=200, options={"default": "uuid()"}, unique=true)
  61.      *
  62.     private $patientId; */
  63. //    /**
  64. //     * @ORM\Column(type="string",nullable=true)
  65. //     * @ORM\GeneratedValue
  66. //     */
  67. //    private $patientId;
  68.     /**
  69.      * @ORM\Column(type="boolean")
  70.      */
  71.     private $isSeen;
  72.     /**
  73.      * @ORM\Column(type="datetime", nullable=true)
  74.      */
  75.     private $seenAt;
  76. //    /**
  77. //     * @ORM\Column(type="string", nullable=true)
  78. //     * @ORM\GeneratedValue
  79. //     */
  80. //    private $uniqueId;
  81.     public function getId(): ?int
  82.     {
  83.         return $this->id;
  84.     }
  85.     /**
  86.      * @return mixed
  87.      */
  88.     public function getPatientName()
  89.     {
  90.         return $this->patientName;
  91.     }
  92.     /**
  93.      * @param mixed $patientName
  94.      */
  95.     public function setPatientName($patientName): void
  96.     {
  97.         $this->patientName $patientName;
  98.     }
  99.     /**
  100.      * @return mixed
  101.      */
  102.     public function getPhone()
  103.     {
  104.         return $this->phone;
  105.     }
  106.     /**
  107.      * @param mixed $phone
  108.      */
  109.     public function setPhone($phone): void
  110.     {
  111.         $this->phone $phone;
  112.     }
  113.     /**
  114.      * @return mixed
  115.      */
  116.     public function getReason()
  117.     {
  118.         return $this->reason;
  119.     }
  120.     /**
  121.      * @param mixed $reason
  122.      */
  123.     public function setReason($reason): void
  124.     {
  125.         $this->reason $reason;
  126.     }
  127.     /**
  128.      * @return mixed
  129.      */
  130.     public function getLocation()
  131.     {
  132.         return $this->location;
  133.     }
  134.     /**
  135.      * @param mixed $location
  136.      */
  137.     public function setLocation($location): void
  138.     {
  139.         $this->location $location;
  140.     }
  141.     /**
  142.      * @return mixed
  143.      */
  144.     public function getBranch()
  145.     {
  146.         return $this->branch;
  147.     }
  148.     /**
  149.      * @param mixed $branch
  150.      */
  151.     public function setBranch($branch): void
  152.     {
  153.         $this->branch $branch;
  154.     }
  155.     /**
  156.      * @return mixed
  157.      */
  158.     public function getAppointmentDate()
  159.     {
  160.         return $this->appointment_date;
  161.     }
  162.     /**
  163.      * @param mixed $appointment_date
  164.      */
  165.     public function setAppointmentDate($appointment_date): void
  166.     {
  167.         $this->appointment_date $appointment_date;
  168.     }
  169.     /**
  170.      * @return mixed
  171.      */
  172.     public function getCreatedAt()
  173.     {
  174.         return $this->createdAt;
  175.     }
  176.     /**
  177.      * @param mixed $createdAt
  178.      */
  179.     public function setCreatedAt($createdAt): void
  180.     {
  181.         $this->createdAt $createdAt;
  182.     }
  183.     /**
  184.      * @return mixed
  185.      */
  186.     public function getUser()
  187.     {
  188.         return $this->user;
  189.     }
  190.     /**
  191.      * @param mixed $user
  192.      */
  193.     public function setUser($user): void
  194.     {
  195.         $this->user $user;
  196.     }
  197. //    /**
  198. //     * @return mixed
  199. //     */
  200. //    public function getPatientId()
  201. //    {
  202. //        return $this->patientId;
  203. //    }
  204. //
  205. //    /**
  206. //     * @param mixed $patientId
  207. //     */
  208. //    public function setPatientId($patientId): void
  209. //    {
  210. //        $this->patientId = $patientId;
  211. //    }
  212.     /**
  213.      * @return mixed
  214.      */
  215.     public function getIsSeen()
  216.     {
  217.         return $this->isSeen;
  218.     }
  219.     /**
  220.      * @param mixed $isSeen
  221.      */
  222.     public function setIsSeen($isSeen): void
  223.     {
  224.         $this->isSeen $isSeen;
  225.     }
  226.     /**
  227.      * @return mixed
  228.      */
  229.     public function getSeenAt()
  230.     {
  231.         return $this->seenAt;
  232.     }
  233.     /**
  234.      * @param mixed $seenAt
  235.      */
  236.     public function setSeenAt($seenAt): void
  237.     {
  238.         $this->seenAt $seenAt;
  239.     }
  240. //    /**
  241. //     * @return mixed
  242. //     */
  243. //    public function getUniqueId()
  244. //    {
  245. //        return $this->uniqueId;
  246. //    }
  247. //
  248. //    /**
  249. //     * @param mixed $uniqueId
  250. //     */
  251. //    public function setUniqueId($uniqueId): void
  252. //    {
  253. //        $this->uniqueId = $uniqueId;
  254. //    }
  255. }