|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* Query Manager |
|
4
|
|
|
* Copyright (c) Webmatch GmbH |
|
5
|
|
|
* |
|
6
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
7
|
|
|
* it under the terms of the GNU General Public License as published by |
|
8
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
|
9
|
|
|
* (at your option) any later version. |
|
10
|
|
|
* |
|
11
|
|
|
* This program is distributed in the hope that it will be useful, |
|
12
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14
|
|
|
* GNU General Public License for more details. |
|
15
|
|
|
*/ |
|
16
|
|
|
|
|
17
|
|
|
namespace WbmQueryManager\Models; |
|
18
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
19
|
|
|
use Shopware\Components\Model\ModelEntity; |
|
20
|
|
|
/** |
|
21
|
|
|
* @ORM\Entity |
|
22
|
|
|
* @ORM\Entity(repositoryClass="Repository") |
|
23
|
|
|
* @ORM\Table(name="wbm_query_manager") |
|
24
|
|
|
*/ |
|
25
|
|
|
class Query extends ModelEntity |
|
26
|
|
|
{ |
|
27
|
|
|
/** |
|
28
|
|
|
* @var integer |
|
29
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
|
30
|
|
|
* @ORM\Id |
|
31
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
|
32
|
|
|
*/ |
|
33
|
|
|
private $id; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @var string |
|
37
|
|
|
* @ORM\Column(name="name", type="string", length=255, nullable=false) |
|
38
|
|
|
*/ |
|
39
|
|
|
private $name; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var string |
|
43
|
|
|
* @ORM\Column(name="sql_string", type="string", nullable=false) |
|
44
|
|
|
*/ |
|
45
|
|
|
private $sqlString; |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @var bool |
|
49
|
|
|
* @ORM\Column(name="has_cronjob", type="boolean", nullable=false) |
|
50
|
|
|
*/ |
|
51
|
|
|
private $hasCronjob = 0; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @var \DateTime $nextRun |
|
55
|
|
|
* |
|
56
|
|
|
* @ORM\Column(name="next_run", type="datetime", nullable=true) |
|
57
|
|
|
*/ |
|
58
|
|
|
private $nextRun; |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* @var \DateTime $lastRun |
|
62
|
|
|
* |
|
63
|
|
|
* @ORM\Column(name="last_run", type="datetime", nullable=true) |
|
64
|
|
|
*/ |
|
65
|
|
|
private $lastRun; |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* @var string $mailRecipient |
|
69
|
|
|
* |
|
70
|
|
|
* @ORM\Column(name="mail_recipient", type="string", nullable=true) |
|
71
|
|
|
*/ |
|
72
|
|
|
private $mailRecipient; |
|
73
|
|
|
|
|
74
|
|
|
/** |
|
75
|
|
|
* @var integer |
|
76
|
|
|
* @ORM\Column(name="interval_int", type="integer", nullable=true) |
|
77
|
|
|
*/ |
|
78
|
|
|
private $intervalInt = 0; |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* @var string |
|
82
|
|
|
* @ORM\Column(name="last_log", type="string", nullable=true) |
|
83
|
|
|
*/ |
|
84
|
|
|
private $lastLog; |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* @var bool |
|
88
|
|
|
* @ORM\Column(name="clear_cache", type="boolean", nullable=false) |
|
89
|
|
|
*/ |
|
90
|
|
|
private $clearCache = 0; |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* @return int |
|
94
|
|
|
*/ |
|
95
|
|
|
public function getId() |
|
96
|
|
|
{ |
|
97
|
|
|
return $this->id; |
|
98
|
|
|
} |
|
99
|
|
|
|
|
100
|
|
|
/** |
|
101
|
|
|
* @param int $id |
|
102
|
|
|
*/ |
|
103
|
|
|
public function setId($id) |
|
104
|
|
|
{ |
|
105
|
|
|
$this->id = $id; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* @return string |
|
110
|
|
|
*/ |
|
111
|
|
|
public function getName() |
|
112
|
|
|
{ |
|
113
|
|
|
return $this->name; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* @param string $name |
|
118
|
|
|
*/ |
|
119
|
|
|
public function setName($name) |
|
120
|
|
|
{ |
|
121
|
|
|
$this->name = $name; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* @return string |
|
126
|
|
|
*/ |
|
127
|
|
|
public function getSqlString() |
|
128
|
|
|
{ |
|
129
|
|
|
return $this->sqlString; |
|
130
|
|
|
} |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* @param string $sqlString |
|
134
|
|
|
*/ |
|
135
|
|
|
public function setSqlString($sqlString) |
|
136
|
|
|
{ |
|
137
|
|
|
$this->sqlString = $sqlString; |
|
138
|
|
|
} |
|
139
|
|
|
|
|
140
|
|
|
/** |
|
141
|
|
|
* @return boolean |
|
142
|
|
|
*/ |
|
143
|
|
|
public function isHasCronjob() |
|
144
|
|
|
{ |
|
145
|
|
|
return $this->hasCronjob; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
/** |
|
149
|
|
|
* @param boolean $hasCronjob |
|
150
|
|
|
*/ |
|
151
|
|
|
public function setHasCronjob($hasCronjob) |
|
152
|
|
|
{ |
|
153
|
|
|
$this->hasCronjob = $hasCronjob; |
|
154
|
|
|
} |
|
155
|
|
|
|
|
156
|
|
|
/** |
|
157
|
|
|
* @return \DateTime |
|
158
|
|
|
*/ |
|
159
|
|
|
public function getNextRun() |
|
160
|
|
|
{ |
|
161
|
|
|
return $this->nextRun; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
/** |
|
165
|
|
|
* @param \DateTime $nextRun |
|
166
|
|
|
*/ |
|
167
|
|
|
public function setNextRun($nextRun) |
|
168
|
|
|
{ |
|
169
|
|
|
$this->nextRun = $nextRun; |
|
170
|
|
|
} |
|
171
|
|
|
|
|
172
|
|
|
/** |
|
173
|
|
|
* @return \DateTime |
|
174
|
|
|
*/ |
|
175
|
|
|
public function getLastRun() |
|
176
|
|
|
{ |
|
177
|
|
|
return $this->lastRun; |
|
178
|
|
|
} |
|
179
|
|
|
|
|
180
|
|
|
/** |
|
181
|
|
|
* @param \DateTime $lastRun |
|
182
|
|
|
*/ |
|
183
|
|
|
public function setLastRun($lastRun) |
|
184
|
|
|
{ |
|
185
|
|
|
$this->lastRun = $lastRun; |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
/** |
|
189
|
|
|
* @return string |
|
190
|
|
|
*/ |
|
191
|
|
|
public function getMailRecipient() |
|
192
|
|
|
{ |
|
193
|
|
|
return $this->mailRecipient; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* @param string $mailRecipient |
|
198
|
|
|
*/ |
|
199
|
|
|
public function setMailRecipient($mailRecipient) |
|
200
|
|
|
{ |
|
201
|
|
|
$this->mailRecipient = $mailRecipient; |
|
202
|
|
|
} |
|
203
|
|
|
|
|
204
|
|
|
/** |
|
205
|
|
|
* @return int |
|
206
|
|
|
*/ |
|
207
|
|
|
public function getIntervalInt() |
|
208
|
|
|
{ |
|
209
|
|
|
return $this->intervalInt; |
|
210
|
|
|
} |
|
211
|
|
|
|
|
212
|
|
|
/** |
|
213
|
|
|
* @param int $intervalInt |
|
214
|
|
|
*/ |
|
215
|
|
|
public function setIntervalInt($intervalInt) |
|
216
|
|
|
{ |
|
217
|
|
|
$this->intervalInt = $intervalInt; |
|
218
|
|
|
} |
|
219
|
|
|
|
|
220
|
|
|
/** |
|
221
|
|
|
* @return string |
|
222
|
|
|
*/ |
|
223
|
|
|
public function getLastLog() |
|
224
|
|
|
{ |
|
225
|
|
|
return $this->lastLog; |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
/** |
|
229
|
|
|
* @param string $lastLog |
|
230
|
|
|
*/ |
|
231
|
|
|
public function setLastLog($lastLog) |
|
232
|
|
|
{ |
|
233
|
|
|
$this->lastLog = $lastLog; |
|
234
|
|
|
} |
|
235
|
|
|
|
|
236
|
|
|
/** |
|
237
|
|
|
* @return boolean |
|
238
|
|
|
*/ |
|
239
|
|
|
public function isClearCache() |
|
240
|
|
|
{ |
|
241
|
|
|
return $this->clearCache; |
|
242
|
|
|
} |
|
243
|
|
|
|
|
244
|
|
|
/** |
|
245
|
|
|
* @param boolean $clearCache |
|
246
|
|
|
*/ |
|
247
|
|
|
public function setClearCache($clearCache) |
|
248
|
|
|
{ |
|
249
|
|
|
$this->clearCache = $clearCache; |
|
250
|
|
|
} |
|
251
|
|
|
} |