<?php
namespace App\Entity;
use App\Repository\BirthCertificateRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Entity(repositoryClass: BirthCertificateRepository::class), ORM\Table(name: 'birth_certificates')]
class BirthCertificate
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\OneToOne(inversedBy: 'birthCertificate', targetEntity: Cases::class, cascade: ['persist', 'remove']), ORM\JoinColumn(nullable: false)]
private $case;
#[ORM\Column(type: 'string', length: 255)]
private $regNum = 'BRN-0001';
#[Gedmo\Blameable(on: 'create'), ORM\ManyToOne(targetEntity: User::class), ORM\JoinColumn(nullable: false)]
private $createdBy;
#[Gedmo\Blameable(on: 'update'), ORM\ManyToOne(targetEntity: User::class)]
private $updatedBy;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
#[Gedmo\Timestampable(on: 'update'), ORM\Column(type: 'datetime')]
private $updatedAt;
public function getId(): ?int
{
return $this->id;
}
public function getCase(): ?Cases
{
return $this->case;
}
public function setCase(Cases $case): self
{
$this->case = $case;
return $this;
}
public function getRegNum(): ?string
{
return $this->regNum;
}
public function setRegNum(string $regNum): self
{
$this->regNum = $regNum;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
public function getUpdatedBy(): ?User
{
return $this->updatedBy;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
}