Passed
Pull Request — master (#347)
by Mirko
07:40
created

FieldNote::getGeocache()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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