FEATURE [timespent][type] change type of time spent to integer

This commit is contained in:
Julie Lenaerts 2023-02-15 11:28:05 +01:00
parent 4a62c2e167
commit 80a88fc00c
2 changed files with 5 additions and 5 deletions

View File

@ -161,12 +161,12 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
private ?DateInterval $warningInterval = null; private ?DateInterval $warningInterval = null;
/** /**
* @ORM\Column(type="time", nullable=true) * @ORM\Column(type="integer", nullable=true)
* @Serializer\Groups({"read", "docgen:read"}) * @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"write"}) * @Serializer\Groups({"write"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"}) * @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/ */
private ?DateTimeInterface $timeSpent = null; private ?int $timeSpent = null;
public function __construct() public function __construct()
{ {
@ -273,7 +273,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
return $this->warningInterval; return $this->warningInterval;
} }
public function getTimeSpent(): ?DateTimeInterface public function getTimeSpent(): ?int
{ {
return $this->timeSpent; return $this->timeSpent;
} }
@ -335,7 +335,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
return $this; return $this;
} }
public function setTimeSpent(?DateTimeInterface $timeSpent): self public function setTimeSpent(?int $timeSpent): self
{ {
$this->timeSpent = $timeSpent; $this->timeSpent = $timeSpent;

View File

@ -16,7 +16,7 @@ final class Version20230210104424 extends AbstractMigration
public function up(Schema $schema): void 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 public function down(Schema $schema): void