1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace AppBundle\Entity; |
4
|
|
|
|
5
|
|
|
use DateTime; |
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* FieldNote |
10
|
|
|
* |
11
|
|
|
* @ORM\Table(name="field_note") |
12
|
|
|
* @ORM\Entity(repositoryClass="AppBundle\Repository\FieldNoteRepository") |
13
|
|
|
*/ |
14
|
|
|
class FieldNote |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* @var int |
18
|
|
|
* |
19
|
|
|
* @ORM\Column(name="id", type="integer") |
20
|
|
|
* @ORM\Id |
21
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
22
|
|
|
*/ |
23
|
|
|
private $id; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var \AppBundle\Entity\User $user |
27
|
|
|
* |
28
|
|
|
* @ORM\ManyToOne(targetEntity="\AppBundle\Entity\User") |
29
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", onDelete="CASCADE") |
30
|
|
|
*/ |
31
|
|
|
private $user; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var int |
35
|
|
|
* |
36
|
|
|
* @ORM\Column(name="type", type="smallint") |
37
|
|
|
*/ |
38
|
|
|
private $type; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var \DateTime |
42
|
|
|
* |
43
|
|
|
* @ORM\Column(name="date", type="datetime") |
44
|
|
|
*/ |
45
|
|
|
private $date; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string |
49
|
|
|
* |
50
|
|
|
* @ORM\Column(name="text", type="string", length=255, nullable=true) |
51
|
|
|
*/ |
52
|
|
|
private $text; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var \AppBundle\Entity\Geocache |
56
|
|
|
* |
57
|
|
|
* @ORM\ManyToOne(targetEntity="\AppBundle\Entity\Geocache") |
58
|
|
|
* @ORM\JoinColumn(name="geocache_id", referencedColumnName="cache_id", onDelete="CASCADE") |
59
|
|
|
*/ |
60
|
|
|
private $geocache; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Get id |
64
|
|
|
* |
65
|
|
|
* @return int |
66
|
|
|
*/ |
67
|
|
|
public function getId() |
68
|
|
|
{ |
69
|
|
|
return $this->id; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Set type |
74
|
|
|
* |
75
|
|
|
* @param int $type |
76
|
|
|
* |
77
|
|
|
* @return \AppBundle\Entity\FieldNote |
78
|
|
|
*/ |
79
|
|
|
public function setType($type) |
80
|
|
|
{ |
81
|
|
|
$this->type = $type; |
82
|
|
|
|
83
|
|
|
return $this; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* Get type |
88
|
|
|
* |
89
|
|
|
* @return int |
90
|
|
|
*/ |
91
|
|
|
public function getType() |
92
|
|
|
{ |
93
|
|
|
return $this->type; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* Set date |
98
|
|
|
* |
99
|
|
|
* @param \DateTime $date |
100
|
|
|
* |
101
|
|
|
* @return \AppBundle\Entity\FieldNote |
102
|
|
|
*/ |
103
|
|
|
public function setDate(DateTime $date) |
104
|
|
|
{ |
105
|
|
|
$this->date = $date; |
106
|
|
|
|
107
|
|
|
return $this; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* Get date |
112
|
|
|
* |
113
|
|
|
* @return \DateTime |
114
|
|
|
*/ |
115
|
|
|
public function getDate() |
116
|
|
|
{ |
117
|
|
|
return $this->date; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* Set text |
122
|
|
|
* |
123
|
|
|
* @param string $text |
124
|
|
|
* |
125
|
|
|
* @return \AppBundle\Entity\FieldNote |
126
|
|
|
*/ |
127
|
|
|
public function setText($text) |
128
|
|
|
{ |
129
|
|
|
$this->text = $text; |
130
|
|
|
|
131
|
|
|
return $this; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* Get text |
136
|
|
|
* |
137
|
|
|
* @return string |
138
|
|
|
*/ |
139
|
|
|
public function getText() |
140
|
|
|
{ |
141
|
|
|
return $this->text; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Set user |
146
|
|
|
* |
147
|
|
|
* @param \AppBundle\Entity\User|null $user |
148
|
|
|
* |
149
|
|
|
* @return \AppBundle\Entity\FieldNote |
150
|
|
|
*/ |
151
|
|
|
public function setUser(User $user = null) |
152
|
|
|
{ |
153
|
|
|
$this->user = $user; |
154
|
|
|
|
155
|
|
|
return $this; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* Get user |
160
|
|
|
* |
161
|
|
|
* @return \AppBundle\Entity\User |
162
|
|
|
*/ |
163
|
|
|
public function getUser() |
164
|
|
|
{ |
165
|
|
|
return $this->user; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* Set geocache |
170
|
|
|
* |
171
|
|
|
* @param \AppBundle\Entity\Geocache|null $geocache |
172
|
|
|
* |
173
|
|
|
* @return \AppBundle\Entity\FieldNote |
174
|
|
|
*/ |
175
|
|
|
public function setGeocache(Geocache $geocache = null) |
176
|
|
|
{ |
177
|
|
|
$this->geocache = $geocache; |
178
|
|
|
|
179
|
|
|
return $this; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* Get geocache |
184
|
|
|
* |
185
|
|
|
* @return \AppBundle\Entity\Geocache |
186
|
|
|
*/ |
187
|
|
|
public function getGeocache() |
188
|
|
|
{ |
189
|
|
|
return $this->geocache; |
190
|
|
|
} |
191
|
|
|
} |
192
|
|
|
|