1 | <?php |
||
19 | class City |
||
20 | { |
||
21 | use EntityIdTrait; |
||
22 | use EntityMetaTrait; |
||
23 | use EntityNameTrait; |
||
24 | |||
25 | /** |
||
26 | * @ORM\OneToMany(targetEntity="App\Entity\Property", mappedBy="city") |
||
27 | */ |
||
28 | private $properties; |
||
29 | |||
30 | /** |
||
31 | * @ORM\OneToMany(targetEntity="App\Entity\District", mappedBy="city") |
||
32 | * @ORM\OrderBy({"name" = "ASC"}) |
||
33 | */ |
||
34 | private $districts; |
||
35 | |||
36 | /** |
||
37 | * @ORM\OneToMany(targetEntity="App\Entity\Neighborhood", mappedBy="city") |
||
38 | * @ORM\OrderBy({"name" = "ASC"}) |
||
39 | */ |
||
40 | private $neighborhoods; |
||
41 | |||
42 | /** |
||
43 | * @ORM\OneToMany(targetEntity="App\Entity\Metro", mappedBy="city", orphanRemoval=true) |
||
44 | * @ORM\OrderBy({"name" = "ASC"}) |
||
45 | */ |
||
46 | private $metro_stations; |
||
47 | |||
48 | /** |
||
49 | * @ORM\Column(type="string", length=255, nullable=true) |
||
50 | */ |
||
51 | private $title; |
||
52 | |||
53 | public function __construct() |
||
60 | |||
61 | public function getProperties(): Collection |
||
65 | |||
66 | public function addProperty(Property $property): self |
||
75 | |||
76 | public function removeProperty(Property $property): self |
||
88 | |||
89 | public function getNeighborhoods(): Collection |
||
93 | |||
94 | public function addNeighborhood(Neighborhood $neighborhood): self |
||
103 | |||
104 | public function removeNeighborhood(Neighborhood $neighborhood): self |
||
116 | |||
117 | public function getMetroStations(): Collection |
||
121 | |||
122 | public function addMetroStation(Metro $metroStation): self |
||
131 | |||
132 | public function removeMetroStation(Metro $metroStation): self |
||
144 | |||
145 | public function getDistricts(): Collection |
||
149 | |||
150 | public function addDistrict(District $district): self |
||
159 | |||
160 | public function removeDistrict(District $district): self |
||
172 | |||
173 | public function getTitle(): ?string |
||
177 | |||
178 | public function setTitle(?string $title): self |
||
184 | } |
||
185 |