zend-blog-3-backend
138 строк · 2.2 Кб
1<?php
2/**
3* Created by PhpStorm.
4* User: morontt
5* Date: 13.11.16
6* Time: 14:08
7*/
8
9namespace App\Entity;
10
11use DateTime;
12use Doctrine\ORM\Mapping as ORM;
13
14/**
15* @ORM\Table()
16* @ORM\Entity(repositoryClass="App\Repository\GeoLocationCountryRepository")
17*/
18class GeoLocationCountry
19{
20/**
21* @var int
22*
23* @ORM\Id
24* @ORM\Column(type="integer")
25* @ORM\GeneratedValue(strategy="AUTO")
26*/
27protected $id;
28
29/**
30* Two-character country code based on ISO 3166.
31*
32* @var string
33* @ORM\Column(name="country_code", type="string", length=2, unique=true)
34*/
35protected $code;
36
37/**
38* Country name based on ISO 3166.
39*
40* @var string
41* @ORM\Column(name="country_name", type="string", length=64)
42*/
43protected $name;
44
45/**
46* @var DateTime
47*
48* @ORM\Column(type="milliseconds_dt")
49*/
50protected $timeCreated;
51
52public function __construct()
53{
54$this->timeCreated = new DateTime();
55}
56
57/**
58* Get id
59*
60* @return int
61*/
62public function getId()
63{
64return $this->id;
65}
66
67/**
68* Set code
69*
70* @param string $code
71*
72* @return GeoLocationCountry
73*/
74public function setCode($code)
75{
76$this->code = $code;
77
78return $this;
79}
80
81/**
82* Get code
83*
84* @return string
85*/
86public function getCode()
87{
88return $this->code;
89}
90
91/**
92* Set name
93*
94* @param string $name
95*
96* @return GeoLocationCountry
97*/
98public function setName($name)
99{
100$this->name = $name;
101
102return $this;
103}
104
105/**
106* Get name
107*
108* @return string
109*/
110public function getName()
111{
112return $this->name;
113}
114
115/**
116* Set timeCreated
117*
118* @param DateTime $timeCreated
119*
120* @return GeoLocationCountry
121*/
122public function setTimeCreated($timeCreated)
123{
124$this->timeCreated = $timeCreated;
125
126return $this;
127}
128
129/**
130* Get timeCreated
131*
132* @return DateTime
133*/
134public function getTimeCreated()
135{
136return $this->timeCreated;
137}
138}
139