adjust news item entity and recreate migration

This commit is contained in:
2023-11-08 11:40:43 +01:00
parent e97571059c
commit ddb90c2e41
2 changed files with 25 additions and 11 deletions

View File

@@ -57,6 +57,15 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
*/
private string $content = '';
/**
* @ORM\Column(type="string")
*
* @groups({"write", "read"})
*
* @Assert\NotNull
*/
private string $type = '';
/**
* @ORM\Column(type="date_immutable", nullable=false)
*/
@@ -183,4 +192,16 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
{
return $this->id;
}
public function getType(): string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
}