| 1 | <?php |
||
| 11 | class City |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @ORM\Id |
||
| 15 | * @ORM\Column(type="integer"); |
||
| 16 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 17 | */ |
||
| 18 | protected $id; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @ORM\Column(type="string", nullable=true) |
||
| 22 | */ |
||
| 23 | protected $name; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @ORM\OneToOne(targetEntity="Country") |
||
| 27 | */ |
||
| 28 | protected $country; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return int|null |
||
| 32 | */ |
||
| 33 | public function getId() |
||
| 37 | |||
| 38 | public function setName($name) |
||
| 44 | |||
| 45 | public function getName() |
||
| 49 | |||
| 50 | public function setCountry(Country $country) |
||
| 56 | |||
| 57 | public function getCountry() |
||
| 61 | } |
||
| 62 |