DownloadLog::getVersion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2017: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Entity\Documentation;
22
23
use AppBundle\Entity\User;
24
use Gedmo\Mapping\Annotation as Gedmo;
25
use Doctrine\ORM\Mapping as ORM;
26
27
/**
28
 * @ORM\Entity()
29
 * @ORM\Table(name="documentation_download_log")
30
 */
31
class DownloadLog
32
{
33
    /**
34
     * @ORM\Id()
35
     * @ORM\GeneratedValue(strategy="AUTO")
36
     * @ORM\Column(type="integer")
37
     * @var int
38
     */
39
    private $id;
40
41
    /**
42
     * @ORM\Column(type="integer")
43
     * @var int
44
     */
45
    private $version;
46
47
    /**
48
     * @Gedmo\Timestampable(on="create")
49
     * @ORM\Column(type="datetime")
50
     * @var \DateTime
51
     */
52
    private $createdAt;
53
54
    /**
55
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\User")
56
     * @ORM\JoinColumn(nullable=true)
57
     * @var User
58
     */
59
    private $user;
60
61
    /**
62
     * @ORM\ManyToOne(targetEntity="Entry")
63
     * @ORM\JoinColumn(nullable=false)
64
     * @var Entry
65
     */
66
    private $entry;
67
68
    /**
69
     * @ORM\Column(type="string", nullable=true)
70
     * @var string
71
     */
72
    private $ipAddress;
73
74
    /**
75
     * Get id
76
     *
77
     * @return integer
78
     */
79
    public function getId()
80
    {
81
        return $this->id;
82
    }
83
84
    /**
85
     * Get version
86
     *
87
     * @return integer
88
     */
89
    public function getVersion()
90
    {
91
        return $this->version;
92
    }
93
94
    /**
95
     * Set version
96
     *
97
     * @param integer $version
98
     *
99
     * @return DownloadLog
100
     */
101
    public function setVersion($version)
102
    {
103
        $this->version = $version;
104
        return $this;
105
    }
106
107
    /**
108
     * Set createdAt
109
     *
110
     * @param \DateTime $createdAt
111
     *
112
     * @return DownloadLog
113
     */
114
    public function setCreatedAt($createdAt)
115
    {
116
        $this->createdAt = $createdAt;
117
118
        return $this;
119
    }
120
121
    /**
122
     * Get createdAt
123
     *
124
     * @return \DateTime
125
     */
126
    public function getCreatedAt()
127
    {
128
        return $this->createdAt;
129
    }
130
131
    /**
132
     * Set user
133
     *
134
     * @param User $user
135
     *
136
     * @return DownloadLog
137
     */
138
    public function setUser(User $user = null)
139
    {
140
        $this->user = $user;
141
142
        return $this;
143
    }
144
145
    /**
146
     * Get user
147
     *
148
     * @return User
149
     */
150
    public function getUser()
151
    {
152
        return $this->user;
153
    }
154
155
    /**
156
     * Set entry
157
     *
158
     * @param Entry $entry
159
     *
160
     * @return DownloadLog
161
     */
162
    public function setEntry(Entry $entry)
163
    {
164
        $this->entry = $entry;
165
166
        return $this;
167
    }
168
169
    /**
170
     * Get entry
171
     *
172
     * @return Entry
173
     */
174
    public function getEntry()
175
    {
176
        return $this->entry;
177
    }
178
179
    /**
180
     * Get ipAddress
181
     *
182
     * @return string
183
     */
184
    public function getIpAddress()
185
    {
186
        return $this->ipAddress;
187
    }
188
189
    /**
190
     * Set ipAddress
191
     *
192
     * @param string $ipAddress
193
     *
194
     * @return DownloadLog
195
     */
196
    public function setIpAddress($ipAddress)
197
    {
198
        $this->ipAddress = $ipAddress;
199
        return $this;
200
    }
201
}
202