Add a notnull constraint on property 'type' when creating an event status

This commit is contained in:
Julie Lenaerts 2024-11-05 15:28:52 +01:00
parent df30ca2c4f
commit 3f381c207d

View File

@ -36,6 +36,7 @@ class Status
private $name; private $name;
#[ORM\ManyToOne(targetEntity: EventType::class, inversedBy: 'statuses')] #[ORM\ManyToOne(targetEntity: EventType::class, inversedBy: 'statuses')]
#[Assert\NotNull(message: 'An event status must be linked to an event type.')]
private ?EventType $type = null; private ?EventType $type = null;
/** /**