Skip to content

Commit

Permalink
refactor: make property private -> protected for entity
Browse files Browse the repository at this point in the history
  • Loading branch information
siganushka committed Oct 7, 2024
1 parent 7a8c2f6 commit 2ea9b76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Entity/Region.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ class Region implements TimestampableInterface
#[ORM\Column(length: 16, options: ['fixed' => true])]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: RegionCodeGenerator::class)]
private string $id;
protected string $id;

#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children', cascade: ['all'])]
private ?Region $parent = null;
protected ?Region $parent = null;

#[ORM\Column]
private string $name;
protected string $name;

/** @var Collection<int, Region> */
#[ORM\OneToMany(targetEntity: self::class, mappedBy: 'parent', cascade: ['all'])]
#[ORM\OrderBy(['parent' => 'ASC', 'id' => 'ASC'])]
private Collection $children;
protected Collection $children;

public function __construct(string $code, string $name)
{
Expand Down

0 comments on commit 2ea9b76

Please sign in to comment.