Add capability to store closing motive when closing accompanying period

The commit introduces new functionality in the bundle that allows storing the closing motive when a course is closed. This is achieved by modifying the model and database schema to include a new `closingMotive` field in AccompanyingPeriodStepHistory entity.
This commit is contained in:
2024-01-23 21:56:17 +01:00
parent 0c9010f065
commit f8840d89bf
5 changed files with 108 additions and 4 deletions

View File

@@ -59,6 +59,13 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda
*/
private string $step;
/**
* @ORM\ManyToOne(targetEntity=ClosingMotive::class)
*
* @ORM\JoinColumn(nullable=true)
*/
private ?AccompanyingPeriod\ClosingMotive $closingMotive = null;
public function getEndDate(): ?\DateTimeImmutable
{
return $this->endDate;
@@ -114,4 +121,16 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda
return $this;
}
public function getClosingMotive(): ?AccompanyingPeriod\ClosingMotive
{
return $this->closingMotive;
}
public function setClosingMotive(?AccompanyingPeriod\ClosingMotive $closingMotive): self
{
$this->closingMotive = $closingMotive;
return $this;
}
}