From 80a88fc00c533bc9282f3b1294200875a86a7acb Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 15 Feb 2023 11:28:05 +0100 Subject: [PATCH] FEATURE [timespent][type] change type of time spent to integer --- .../AccompanyingPeriodWorkEvaluation.php | 8 ++++---- .../migrations/Version20230210104424.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index 9cb26b4c3..8780f7d17 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -161,12 +161,12 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU private ?DateInterval $warningInterval = null; /** - * @ORM\Column(type="time", nullable=true) + * @ORM\Column(type="integer", nullable=true) * @Serializer\Groups({"read", "docgen:read"}) * @Serializer\Groups({"write"}) * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ - private ?DateTimeInterface $timeSpent = null; + private ?int $timeSpent = null; public function __construct() { @@ -273,7 +273,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU return $this->warningInterval; } - public function getTimeSpent(): ?DateTimeInterface + public function getTimeSpent(): ?int { return $this->timeSpent; } @@ -335,7 +335,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU return $this; } - public function setTimeSpent(?DateTimeInterface $timeSpent): self + public function setTimeSpent(?int $timeSpent): self { $this->timeSpent = $timeSpent; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php b/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php index ea18e9adf..ec802a993 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20230210104424.php @@ -16,7 +16,7 @@ final class Version20230210104424 extends AbstractMigration public function up(Schema $schema): void { - $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD timeSpent TIME(0) WITHOUT TIME ZONE DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation ADD timeSpent INT DEFAULT NULL'); } public function down(Schema $schema): void