1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* For licensing terms, see /license.txt */ |
6
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Entity; |
8
|
|
|
|
9
|
|
|
use DateTime; |
10
|
|
|
use Doctrine\ORM\Mapping as ORM; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* TrackEAccess. |
14
|
|
|
* |
15
|
|
|
* @ORM\Table(name="track_e_access", indexes={ |
16
|
|
|
* @ORM\Index(name="access_user_id", columns={"access_user_id"}), |
17
|
|
|
* @ORM\Index(name="access_c_id", columns={"c_id"}), |
18
|
|
|
* @ORM\Index(name="session_id", columns={"session_id"}), |
19
|
|
|
* @ORM\Index(name="user_course_session_date", columns={"access_user_id", "c_id", "session_id", "access_date"}) |
20
|
|
|
* }) |
21
|
|
|
* @ORM\Entity |
22
|
|
|
*/ |
23
|
|
|
class TrackEAccess |
24
|
|
|
{ |
25
|
|
|
/** |
26
|
|
|
* @ORM\Column(name="access_id", type="integer") |
27
|
|
|
* @ORM\Id |
28
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
29
|
|
|
*/ |
30
|
|
|
protected int $accessId; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @ORM\Column(name="access_user_id", type="integer", nullable=true) |
34
|
|
|
*/ |
35
|
|
|
protected ?int $accessUserId = null; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @ORM\Column(name="access_date", type="datetime", nullable=false) |
39
|
|
|
*/ |
40
|
|
|
protected DateTime $accessDate; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @ORM\Column(name="c_id", type="integer", nullable=false) |
44
|
|
|
*/ |
45
|
|
|
protected int $cId; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @ORM\Column(name="access_tool", type="string", length=30, nullable=true) |
49
|
|
|
*/ |
50
|
|
|
protected ?string $accessTool = null; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @ORM\Column(name="session_id", type="integer", nullable=false) |
54
|
|
|
*/ |
55
|
|
|
protected int $sessionId; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @ORM\Column(name="user_ip", type="string", length=45, nullable=false) |
59
|
|
|
*/ |
60
|
|
|
protected string $userIp; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Set accessUserId. |
64
|
|
|
* |
65
|
|
|
* @return TrackEAccess |
66
|
|
|
*/ |
67
|
|
|
public function setAccessUserId(int $accessUserId) |
68
|
|
|
{ |
69
|
|
|
$this->accessUserId = $accessUserId; |
70
|
|
|
|
71
|
|
|
return $this; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* Get accessUserId. |
76
|
|
|
* |
77
|
|
|
* @return int |
78
|
|
|
*/ |
79
|
|
|
public function getAccessUserId() |
80
|
|
|
{ |
81
|
|
|
return $this->accessUserId; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* Set accessDate. |
86
|
|
|
* |
87
|
|
|
* @return TrackEAccess |
88
|
|
|
*/ |
89
|
|
|
public function setAccessDate(DateTime $accessDate) |
90
|
|
|
{ |
91
|
|
|
$this->accessDate = $accessDate; |
92
|
|
|
|
93
|
|
|
return $this; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* Get accessDate. |
98
|
|
|
* |
99
|
|
|
* @return DateTime |
100
|
|
|
*/ |
101
|
|
|
public function getAccessDate() |
102
|
|
|
{ |
103
|
|
|
return $this->accessDate; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* Set cId. |
108
|
|
|
* |
109
|
|
|
* @return TrackEAccess |
110
|
|
|
*/ |
111
|
|
|
public function setCId(int $cId) |
112
|
|
|
{ |
113
|
|
|
$this->cId = $cId; |
114
|
|
|
|
115
|
|
|
return $this; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* Get cId. |
120
|
|
|
* |
121
|
|
|
* @return int |
122
|
|
|
*/ |
123
|
|
|
public function getCId() |
124
|
|
|
{ |
125
|
|
|
return $this->cId; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Set accessTool. |
130
|
|
|
* |
131
|
|
|
* @return TrackEAccess |
132
|
|
|
*/ |
133
|
|
|
public function setAccessTool(string $accessTool) |
134
|
|
|
{ |
135
|
|
|
$this->accessTool = $accessTool; |
136
|
|
|
|
137
|
|
|
return $this; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* Get accessTool. |
142
|
|
|
* |
143
|
|
|
* @return string |
144
|
|
|
*/ |
145
|
|
|
public function getAccessTool() |
146
|
|
|
{ |
147
|
|
|
return $this->accessTool; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* Set sessionId. |
152
|
|
|
* |
153
|
|
|
* @return TrackEAccess |
154
|
|
|
*/ |
155
|
|
|
public function setSessionId(int $sessionId) |
156
|
|
|
{ |
157
|
|
|
$this->sessionId = $sessionId; |
158
|
|
|
|
159
|
|
|
return $this; |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* Get sessionId. |
164
|
|
|
* |
165
|
|
|
* @return int |
166
|
|
|
*/ |
167
|
|
|
public function getSessionId() |
168
|
|
|
{ |
169
|
|
|
return $this->sessionId; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* Set userIp. |
174
|
|
|
* |
175
|
|
|
* @return TrackEAccess |
176
|
|
|
*/ |
177
|
|
|
public function setUserIp(string $userIp) |
178
|
|
|
{ |
179
|
|
|
$this->userIp = $userIp; |
180
|
|
|
|
181
|
|
|
return $this; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* Get userIp. |
186
|
|
|
* |
187
|
|
|
* @return string |
188
|
|
|
*/ |
189
|
|
|
public function getUserIp() |
190
|
|
|
{ |
191
|
|
|
return $this->userIp; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* Get accessId. |
196
|
|
|
* |
197
|
|
|
* @return int |
198
|
|
|
*/ |
199
|
|
|
public function getAccessId() |
200
|
|
|
{ |
201
|
|
|
return $this->accessId; |
202
|
|
|
} |
203
|
|
|
} |
204
|
|
|
|