From 24b11f609df954e9a92a95c4f28f8cfafacf2afd Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 24 Feb 2022 16:11:29 +0100 Subject: [PATCH] AccompanyingPeriodWork: add title on AccPeriodWorkEvaluationDocument --- ...companyingPeriodWorkEvaluationDocument.php | 20 +++++++++++ .../migrations/Version20220224145951.php | 36 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20220224145951.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php index 9c2e817f1..b9b52f899 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocument.php @@ -82,6 +82,14 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct */ private ?DocGeneratorTemplate $template = null; + /** + * @ORM\Column(type="text", nullable=true) + * @Serializer\Groups({"read"}) + * @Serializer\Groups({"write"}) + * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) + */ + private ?string $title = null; + /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) * @Serializer\Groups({"read"}) @@ -129,6 +137,11 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct return $this->template; } + public function getTitle(): ?string + { + return $this->title; + } + /** * @return DateTimeImmutable|null */ @@ -187,6 +200,13 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct return $this; } + public function setTitle(?string $title): AccompanyingPeriodWorkEvaluationDocument + { + $this->title = $title; + + return $this; + } + public function setUpdatedAt(DateTimeInterface $datetime): TrackUpdateInterface { $this->updatedAt = $datetime; diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20220224145951.php b/src/Bundle/ChillPersonBundle/migrations/Version20220224145951.php new file mode 100644 index 000000000..13fb91d4f --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20220224145951.php @@ -0,0 +1,36 @@ +addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document ADD title TEXT DEFAULT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_evaluation_document DROP title'); + } +}