mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
FEATURE [eval][duration] property added to an to save the time spent working on evaluation
This commit is contained in:
parent
6254303392
commit
f75f6719bc
@ -160,6 +160,11 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
|
|||||||
*/
|
*/
|
||||||
private ?DateInterval $warningInterval = null;
|
private ?DateInterval $warningInterval = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="time", nullable=true)
|
||||||
|
*/
|
||||||
|
private ?DateTimeInterface $timeSpent = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->documents = new ArrayCollection();
|
$this->documents = new ArrayCollection();
|
||||||
@ -265,6 +270,11 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
|
|||||||
return $this->warningInterval;
|
return $this->warningInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTimeSpent(): ?DateTimeInterface
|
||||||
|
{
|
||||||
|
return $this->timeSpent;
|
||||||
|
}
|
||||||
|
|
||||||
public function removeDocument(AccompanyingPeriodWorkEvaluationDocument $document): self
|
public function removeDocument(AccompanyingPeriodWorkEvaluationDocument $document): self
|
||||||
{
|
{
|
||||||
$this->documents->removeElement($document);
|
$this->documents->removeElement($document);
|
||||||
@ -322,6 +332,13 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setTimeSpent(?DateTimeInterface $timeSpent): self
|
||||||
|
{
|
||||||
|
$this->timeSpent = $timeSpent;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setEvaluation(?Evaluation $evaluation): AccompanyingPeriodWorkEvaluation
|
public function setEvaluation(?Evaluation $evaluation): AccompanyingPeriodWorkEvaluation
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\Person;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
final class Version20230210104424 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add a duration field to accompanyingPeriodWorkEvaluation';
|
||||||
|
}
|
||||||
|
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation DROP timeSpent');
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user