<?phpnamespace App\Entity;use App\Repository\PeriodRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: PeriodRepository::class)]class Period{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $startDate = null; #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] private ?\DateTimeInterface $endDate = null; #[ORM\Column(length: 15)] private ?string $code = null; #[ORM\ManyToOne] private ?User $createdBy = null; #[ORM\ManyToOne] private ?User $updatedBy = null; #[ORM\Column] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column(nullable: true)] private ?\DateTimeImmutable $updatedAt = null; public function __construct() { $this->createdAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getStartDate(): ?\DateTimeInterface { return $this->startDate; } public function setStartDate(\DateTimeInterface $startDate): self { $this->startDate = $startDate; return $this; } public function getEndDate(): ?\DateTimeInterface { return $this->endDate; } public function setEndDate(?\DateTimeInterface $endDate): self { $this->endDate = $endDate; return $this; } public function getCode(): ?string { return $this->code; } public function setCode(string $code): self { $this->code = $code; return $this; } public function getCreatedBy(): ?User { return $this->createdBy; } public function setCreatedBy(?User $createdBy): self { $this->createdBy = $createdBy; return $this; } public function getUpdatedBy(): ?User { return $this->updatedBy; } public function setUpdatedBy(?User $updatedBy): self { $this->updatedBy = $updatedBy; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeImmutable $updatedAt): self { $this->updatedAt = $updatedAt; return $this; }}