Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 95df0f0

Browse files
committed
feat(feedback): Allow commenting on Feedback
1 parent 5bce561 commit 95df0f0

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DoctrineMigrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Doctrine\Migrations\AbstractMigration;
9+
10+
/**
11+
* Auto-generated Migration: Please modify to your needs!
12+
*/
13+
final class Version20241006112324 extends AbstractMigration
14+
{
15+
public function getDescription(): string
16+
{
17+
return 'Allow administrators commenting on feedback';
18+
}
19+
20+
public function up(Schema $schema): void
21+
{
22+
// this up() migration is auto-generated, please modify it to your needs
23+
$this->addSql('ALTER TABLE feedback ADD comment TEXT DEFAULT NULL');
24+
}
25+
26+
public function down(Schema $schema): void
27+
{
28+
// this down() migration is auto-generated, please modify it to your needs
29+
$this->addSql('CREATE SCHEMA public');
30+
$this->addSql('ALTER TABLE feedback DROP comment');
31+
}
32+
}

src/Entity/Feedback.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class Feedback
5858
#[ORM\Column]
5959
private \DateTimeImmutable $updated_at;
6060

61+
#[ORM\Column(type: Types::TEXT, nullable: true)]
62+
private ?string $comment = null;
63+
6164
public function getId(): ?Ulid
6265
{
6366
return $this->id;
@@ -191,4 +194,16 @@ public function updateUpdatedAtValue(): void
191194
{
192195
$this->updated_at = new \DateTimeImmutable();
193196
}
197+
198+
public function getComment(): ?string
199+
{
200+
return $this->comment;
201+
}
202+
203+
public function setComment(?string $comment): static
204+
{
205+
$this->comment = $comment;
206+
207+
return $this;
208+
}
194209
}

0 commit comments

Comments
 (0)