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

Commit 05fc142

Browse files
committed
fix(entity): Specify default value for enums
1 parent 907582a commit 05fc142

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Entity/Feedback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Feedback
3434
private string $description;
3535

3636
#[ORM\Column(length: 255, enumType: FeedbackType::class)]
37-
private FeedbackType $type;
37+
private FeedbackType $type = FeedbackType::Others;
3838

3939
/**
4040
* @var array<string, string|null> $metadata the metadata for the feedback

src/Entity/Question.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Question
3131
private string $type;
3232

3333
#[ORM\Column(enumType: QuestionDifficulty::class)]
34-
private QuestionDifficulty $difficulty;
34+
private QuestionDifficulty $difficulty = QuestionDifficulty::Unspecified;
3535

3636
#[ORM\Column(length: 255)]
3737
private string $title;

src/Entity/SolutionEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SolutionEvent extends BaseEvent
2020
private Question $question;
2121

2222
#[ORM\Column(enumType: SolutionEventStatus::class)]
23-
private SolutionEventStatus $status;
23+
private SolutionEventStatus $status = SolutionEventStatus::Unspecified;
2424

2525
#[ORM\Column(type: Types::TEXT)]
2626
private string $query;

0 commit comments

Comments
 (0)