diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index 078ef0c3c..39266b57e 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -160,6 +160,11 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU */ private ?DateInterval $warningInterval = null; + /** + * @ORM\Column(type="time", nullable=true) + */ + private ?DateTimeInterface $timeSpent = null; + public function __construct() { $this->documents = new ArrayCollection(); @@ -265,6 +270,11 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU return $this->warningInterval; } + public function getTimeSpent(): ?DateTimeInterface + { + return $this->timeSpent; + } + public function removeDocument(AccompanyingPeriodWorkEvaluationDocument $document): self { $this->documents->removeElement($document); @@ -322,6 +332,13 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU return $this; } + public function setTimeSpent(?DateTimeInterface $timeSpent): self + { + $this->timeSpent = $timeSpent; + + return $this; + } + public function setEvaluation(?Evaluation $evaluation): AccompanyingPeriodWorkEvaluation { if ( diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php b/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php new file mode 100644 index 000000000..ea18e9adf --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php @@ -0,0 +1,26 @@ +addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD timeSpent TIME(0) WITHOUT TIME ZONE DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation DROP timeSpent'); + } +}