src/Entity/BirthCertificate.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BirthCertificateRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. #[ORM\Entity(repositoryClassBirthCertificateRepository::class), ORM\Table(name'birth_certificates')]
  7. class BirthCertificate
  8. {
  9.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  10.     private $id;
  11.     #[ORM\OneToOne(inversedBy'birthCertificate'targetEntityCases::class, cascade: ['persist''remove']), ORM\JoinColumn(nullablefalse)]
  12.     private $case;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $regNum 'BRN-0001';
  15.     #[Gedmo\Blameable(on'create'), ORM\ManyToOne(targetEntityUser::class), ORM\JoinColumn(nullablefalse)]
  16.     private $createdBy;
  17.     #[Gedmo\Blameable(on'update'), ORM\ManyToOne(targetEntityUser::class)]
  18.     private $updatedBy;
  19.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  20.     private $createdAt;
  21.     #[Gedmo\Timestampable(on'update'), ORM\Column(type'datetime')]
  22.     private $updatedAt;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getCase(): ?Cases
  28.     {
  29.         return $this->case;
  30.     }
  31.     public function setCase(Cases $case): self
  32.     {
  33.         $this->case $case;
  34.         return $this;
  35.     }
  36.     public function getRegNum(): ?string
  37.     {
  38.         return $this->regNum;
  39.     }
  40.     public function setRegNum(string $regNum): self
  41.     {
  42.         $this->regNum $regNum;
  43.         return $this;
  44.     }
  45.     public function getCreatedBy(): ?User
  46.     {
  47.         return $this->createdBy;
  48.     }
  49.     public function getUpdatedBy(): ?User
  50.     {
  51.         return $this->updatedBy;
  52.     }
  53.     public function getCreatedAt(): ?\DateTimeInterface
  54.     {
  55.         return $this->createdAt;
  56.     }
  57.     public function getUpdatedAt(): ?\DateTimeInterface
  58.     {
  59.         return $this->updatedAt;
  60.     }
  61. }