diff --git a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php index 56380ec74..f852e9f14 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php @@ -71,6 +71,12 @@ class StoredObject implements AsyncFileInterface, Document */ private array $keyInfos = []; + /** + * @ORM\Column(type="text", name="title") + * @Serializer\Groups({"read", "write"}) + */ + private string $title = ''; + /** * @ORM\Column(type="text", name="type") * @Serializer\Groups({"read", "write"}) @@ -127,6 +133,11 @@ class StoredObject implements AsyncFileInterface, Document return $this->getFilename(); } + public function getTitle() + { + return $this->title; + } + public function getType() { return $this->type; @@ -177,6 +188,13 @@ class StoredObject implements AsyncFileInterface, Document return $this; } + public function setTitle(?string $title) + { + $this->title = (string) $title; + + return $this; + } + public function setType(?string $type) { $this->type = (string) $type; diff --git a/src/Bundle/ChillDocStoreBundle/migrations/Version20220525141646.php b/src/Bundle/ChillDocStoreBundle/migrations/Version20220525141646.php new file mode 100644 index 000000000..c3f92dd7b --- /dev/null +++ b/src/Bundle/ChillDocStoreBundle/migrations/Version20220525141646.php @@ -0,0 +1,36 @@ +addSql('ALTER TABLE chill_doc.stored_object DROP title'); + } + + public function up(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_doc.stored_object ADD title TEXT NOT NULL DEFAULT \'\' '); + } +}