Completed
Pull Request — development (#673)
by Nick
12:54 queued 04:44
created

GeocacheLog::setEntryLastModified()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\GeoCache\Entity;
4
5
use DateTime;
6
use Doctrine\ORM\Mapping as ORM;
7
use Oc\User\Entity\User;
8
9
/**
10
 * CacheLogs
11
 *
12
 * @ORM\Table(name="cache_logs", uniqueConstraints={@ORM\UniqueConstraint(name="uuid", columns={"uuid"})}, indexes={@ORM\Index(name="owner_notified", columns={"owner_notified"}), @ORM\Index(name="last_modified", columns={"last_modified"}), @ORM\Index(name="type", columns={"type", "cache_id"}), @ORM\Index(name="date_created", columns={"date_created"}), @ORM\Index(name="user_id", columns={"user_id", "cache_id"}), @ORM\Index(name="cache_id", columns={"cache_id", "user_id"}), @ORM\Index(name="date", columns={"cache_id", "date", "date_created"}), @ORM\Index(name="order_date", columns={"cache_id", "order_date", "date_created", "id"})})
13
 * @ORM\Entity
14
 */
15
class GeocacheLog
16
{
17
    const LOG_TYPE_FOUND = 1;
18
    const LOG_TYPE_NOT_FOUND = 2;
19
    const LOG_TYPE_NOTE = 3;
20
    const LOG_TYPE_ATTENDED = 7;
21
22
    const NEEDS_MAINTENANCE_ACTIVATE = 2;
23
    const NEEDS_MAINTENANCE_DEACTIVATE = 1;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="uuid", type="string", length=36, nullable=false)
29
     */
30
    private $uuid;
31
32
    /**
33
     * @var int
34
     *
35
     * @ORM\Column(name="node", type="integer", nullable=false)
36
     */
37
    private $node = 0;
38
39
    /**
40
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
41
     *
42
     * @ORM\Column(name="date_created", type="datetime", nullable=false)
43
     */
44
    private $dateCreated;
45
46
    /**
47
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
48
     *
49
     * @ORM\Column(name="entry_last_modified", type="datetime", nullable=false)
50
     */
51
    private $entryLastModified;
52
53
    /**
54
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
55
     *
56
     * @ORM\Column(name="last_modified", type="datetime", nullable=false)
57
     */
58
    private $lastModified;
59
60
    /**
61
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
62
     *
63
     * @ORM\Column(name="log_last_modified", type="datetime", nullable=false)
64
     */
65
    private $logLastModified;
66
67
    /**
68
     * @var integer
69
     *
70
     * @ORM\Column(name="cache_id", type="integer", nullable=false)
71
     */
72
    private $cacheId;
73
74
    /**
75
     * @var User $user
0 ignored issues
show
introduced by
User => \Oc\User\Entity\User
Loading history...
76
     *
77
     * @ORM\ManyToOne(targetEntity="\Oc\User\Entity\User")
78
     * @ORM\JoinColumn(name="user_id", referencedColumnName="user_id", onDelete="CASCADE")
79
     */
80
    private $user;
0 ignored issues
show
Unused Code introduced by
The property $user is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
81
82
    /**
83
     * @var boolean
84
     *
85
     * @ORM\Column(name="type", type="boolean", nullable=false)
86
     */
87
    private $type;
88
89
    /**
90
     * @var bool
91
     *
92
     * @ORM\Column(name="oc_team_comment", type="boolean", nullable=false)
93
     */
94
    private $ocTeamComment = false;
95
96
    /**
97
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
98
     *
99
     * @ORM\Column(name="date", type="datetime", nullable=false)
100
     */
101
    private $date;
102
103
    /**
104
     * @var DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
105
     *
106
     * @ORM\Column(name="order_date", type="datetime", nullable=false)
107
     */
108
    private $orderDate;
109
110
    /**
111
     * @var int
112
     *
113
     * @ORM\Column(name="needs_maintenance", type="integer", nullable=false)
114
     */
115
    private $needsMaintenance = 0;
116
117
    /**
118
     * @var int
119
     *
120
     * @ORM\Column(name="listing_outdated", type="integer", nullable=false)
121
     */
122
    private $listingOutdated = 0;
123
124
    /**
125
     * @var string
126
     *
127
     * @ORM\Column(name="text", type="text", nullable=false)
128
     */
129
    private $text;
130
131
    /**
132
     * @var bool
133
     *
134
     * @ORM\Column(name="text_html", type="boolean", nullable=false)
135
     */
136
    private $textHtml = true;
137
138
    /**
139
     * @var bool
140
     *
141
     * @ORM\Column(name="text_htmledit", type="boolean", nullable=false)
142
     */
143
    private $textHtmledit = true;
144
145
    /**
146
     * @var bool
147
     *
148
     * @ORM\Column(name="owner_notified", type="boolean", nullable=false)
149
     */
150
    private $ownerNotified = false;
151
152
    /**
153
     * @var integer
154
     *
155
     * @ORM\Column(name="picture", type="smallint", nullable=false)
156
     */
157
    private $picture;
158
159
    /**
160
     * @var integer
161
     *
162
     * @ORM\Column(name="id", type="integer")
163
     * @ORM\Id
164
     * @ORM\GeneratedValue(strategy="IDENTITY")
165
     */
166
    private $id;
167
168
    /**
169
     * Set uuid
170
     *
171
     * @param string $uuid
172
     *
173
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
174
     */
175
    public function setUuid($uuid)
176
    {
177
        $this->uuid = $uuid;
178
179
        return $this;
180
    }
181
182
    /**
183
     * Get uuid
184
     *
185
     * @return string
186
     */
187
    public function getUuid()
188
    {
189
        return $this->uuid;
190
    }
191
192
    /**
193
     * Set node
194
     *
195
     * @param int $node
196
     *
197
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
198
     */
199
    public function setNode($node)
200
    {
201
        $this->node = $node;
202
203
        return $this;
204
    }
205
206
    /**
207
     * Get node
208
     *
209
     * @return bool
210
     */
211
    public function getNode()
212
    {
213
        return $this->node;
214
    }
215
216
    /**
217
     * Set dateCreated
218
     *
219
     * @param DateTime $dateCreated
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
220
     *
221
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
222
     */
223
    public function setDateCreated(DateTime $dateCreated)
224
    {
225
        $this->dateCreated = $dateCreated;
226
227
        return $this;
228
    }
229
230
    /**
231
     * Get dateCreated
232
     *
233
     * @return DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
234
     */
235
    public function getDateCreated()
236
    {
237
        return $this->dateCreated;
238
    }
239
240
    /**
241
     * Set entryLastModified
242
     *
243
     * @param DateTime $entryLastModified
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
244
     *
245
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
246
     */
247
    public function setEntryLastModified(DateTime $entryLastModified)
248
    {
249
        $this->entryLastModified = $entryLastModified;
250
251
        return $this;
252
    }
253
254
    /**
255
     * Get entryLastModified
256
     *
257
     * @return DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
258
     */
259
    public function getEntryLastModified()
260
    {
261
        return $this->entryLastModified;
262
    }
263
264
    /**
265
     * Set lastModified
266
     *
267
     * @param DateTime $lastModified
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
268
     *
269
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
270
     */
271
    public function setLastModified(DateTime $lastModified)
272
    {
273
        $this->lastModified = $lastModified;
274
275
        return $this;
276
    }
277
278
    /**
279
     * Get lastModified
280
     *
281
     * @return DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
282
     */
283
    public function getLastModified()
284
    {
285
        return $this->lastModified;
286
    }
287
288
    /**
289
     * Set logLastModified
290
     *
291
     * @param DateTime $logLastModified
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
292
     *
293
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
294
     */
295
    public function setLogLastModified(DateTime $logLastModified)
296
    {
297
        $this->logLastModified = $logLastModified;
298
299
        return $this;
300
    }
301
302
    /**
303
     * Get logLastModified
304
     *
305
     * @return DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
306
     */
307
    public function getLogLastModified()
308
    {
309
        return $this->logLastModified;
310
    }
311
312
    /**
313
     * Set cacheId
314
     *
315
     * @param int $cacheId
316
     *
317
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
318
     */
319
    public function setCacheId($cacheId)
320
    {
321
        $this->cacheId = $cacheId;
322
323
        return $this;
324
    }
325
326
    /**
327
     * Get cacheId
328
     *
329
     * @return int
330
     */
331
    public function getCacheId()
332
    {
333
        return $this->cacheId;
334
    }
335
336
    /**
337
     * Set type
338
     *
339
     * @param bool $type
340
     *
341
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
342
     */
343
    public function setType($type)
344
    {
345
        $this->type = $type;
346
347
        return $this;
348
    }
349
350
    /**
351
     * Get type
352
     *
353
     * @return bool
354
     */
355
    public function getType()
356
    {
357
        return $this->type;
358
    }
359
360
    /**
361
     * Set ocTeamComment
362
     *
363
     * @param bool $ocTeamComment
364
     *
365
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
366
     */
367
    public function setOcTeamComment($ocTeamComment)
368
    {
369
        $this->ocTeamComment = $ocTeamComment;
370
371
        return $this;
372
    }
373
374
    /**
375
     * Get ocTeamComment
376
     *
377
     * @return bool
378
     */
379
    public function getOcTeamComment()
380
    {
381
        return $this->ocTeamComment;
382
    }
383
384
    /**
385
     * Set date
386
     *
387
     * @param DateTime $date
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
388
     *
389
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
390
     */
391
    public function setDate(DateTime $date)
392
    {
393
        $this->date = $date;
394
395
        return $this;
396
    }
397
398
    /**
399
     * Get date
400
     *
401
     * @return DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
402
     */
403
    public function getDate()
404
    {
405
        return $this->date;
406
    }
407
408
    /**
409
     * Set orderDate
410
     *
411
     * @param DateTime $orderDate
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
412
     *
413
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
414
     */
415
    public function setOrderDate(DateTime $orderDate)
416
    {
417
        $this->orderDate = $orderDate;
418
419
        return $this;
420
    }
421
422
    /**
423
     * Get orderDate
424
     *
425
     * @return DateTime
0 ignored issues
show
introduced by
DateTime => \DateTime
Loading history...
426
     */
427
    public function getOrderDate()
428
    {
429
        return $this->orderDate;
430
    }
431
432
    /**
433
     * Set needsMaintenance
434
     *
435
     * @param int $needsMaintenance
436
     *
437
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
438
     */
439
    public function setNeedsMaintenance($needsMaintenance)
440
    {
441
        $this->needsMaintenance = $needsMaintenance;
442
443
        return $this;
444
    }
445
446
    /**
447
     * Get needsMaintenance
448
     *
449
     * @return bool
450
     */
451
    public function getNeedsMaintenance()
452
    {
453
        return $this->needsMaintenance;
454
    }
455
456
    /**
457
     * Set listingOutdated
458
     *
459
     * @param int $listingOutdated
460
     *
461
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
462
     */
463
    public function setListingOutdated($listingOutdated)
464
    {
465
        $this->listingOutdated = $listingOutdated;
466
467
        return $this;
468
    }
469
470
    /**
471
     * Get listingOutdated
472
     *
473
     * @return bool
474
     */
475
    public function getListingOutdated()
476
    {
477
        return $this->listingOutdated;
478
    }
479
480
    /**
481
     * Set text
482
     *
483
     * @param string $text
484
     *
485
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
486
     */
487
    public function setText($text)
488
    {
489
        $this->text = $text;
490
491
        return $this;
492
    }
493
494
    /**
495
     * Get text
496
     *
497
     * @return string
498
     */
499
    public function getText()
500
    {
501
        return $this->text;
502
    }
503
504
    /**
505
     * Set textHtml
506
     *
507
     * @param bool $textHtml
508
     *
509
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
510
     */
511
    public function setTextHtml($textHtml)
512
    {
513
        $this->textHtml = $textHtml;
514
515
        return $this;
516
    }
517
518
    /**
519
     * Get textHtml
520
     *
521
     * @return bool
522
     */
523
    public function getTextHtml()
524
    {
525
        return $this->textHtml;
526
    }
527
528
    /**
529
     * Set textHtmledit
530
     *
531
     * @param bool $textHtmledit
532
     *
533
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
534
     */
535
    public function setTextHtmledit($textHtmledit)
536
    {
537
        $this->textHtmledit = $textHtmledit;
538
539
        return $this;
540
    }
541
542
    /**
543
     * Get textHtmledit
544
     *
545
     * @return bool
546
     */
547
    public function getTextHtmledit()
548
    {
549
        return $this->textHtmledit;
550
    }
551
552
    /**
553
     * Set ownerNotified
554
     *
555
     * @param bool $ownerNotified
556
     *
557
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
558
     */
559
    public function setOwnerNotified($ownerNotified)
560
    {
561
        $this->ownerNotified = $ownerNotified;
562
563
        return $this;
564
    }
565
566
    /**
567
     * Get ownerNotified
568
     *
569
     * @return bool
570
     */
571
    public function getOwnerNotified()
572
    {
573
        return $this->ownerNotified;
574
    }
575
576
    /**
577
     * Set picture
578
     *
579
     * @param int $picture
580
     *
581
     * @return GeocacheLog
0 ignored issues
show
introduced by
GeocacheLog => \Array\GeocacheLog
Loading history...
582
     */
583
    public function setPicture($picture)
584
    {
585
        $this->picture = $picture;
586
587
        return $this;
588
    }
589
590
    /**
591
     * Get picture
592
     *
593
     * @return int
594
     */
595
    public function getPicture()
596
    {
597
        return $this->picture;
598
    }
599
600
    /**
601
     * Get id
602
     *
603
     * @return int
604
     */
605
    public function getId()
606
    {
607
        return $this->id;
608
    }
609
}
610