1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of the wow-apps/symfony-proxybonanza project |
4
|
|
|
* https://github.com/wow-apps/symfony-proxybonanza |
5
|
|
|
* |
6
|
|
|
* (c) 2016 WoW-Apps |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WowApps\ProxybonanzaBundle\Entity; |
13
|
|
|
|
14
|
|
|
use Doctrine\ORM\Mapping as ORM; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class Proxy |
18
|
|
|
* @ORM\Table( |
19
|
|
|
* name="proxybonanza_proxies", |
20
|
|
|
* options={"collate"="utf8_unicode_ci", "charset"="utf8", "engine"="InnoDB"} |
21
|
|
|
* ) |
22
|
|
|
* @ORM\Entity(repositoryClass="WowApps\ProxybonanzaBundle\Repository\ProxiesRepository") |
23
|
|
|
* @author Alexey Samara <[email protected]> |
24
|
|
|
* @package wow-apps/symfony-proxybonanza |
25
|
|
|
*/ |
26
|
|
|
class Proxy |
27
|
|
|
{ |
28
|
|
|
const TABLE_NAME = 'proxybonanza_proxies'; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @var integer |
32
|
|
|
* @ORM\Column(name="proxy_id", type="integer") |
33
|
|
|
* @ORM\Id |
34
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
35
|
|
|
*/ |
36
|
|
|
private $proxyId; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var integer |
40
|
|
|
* @ORM\Column(name="proxy_plan", type="integer", nullable=false) |
41
|
|
|
*/ |
42
|
|
|
private $proxyPlan; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
* @ORM\Column(name="proxy_ip", type="string", nullable=false) |
47
|
|
|
*/ |
48
|
|
|
private $proxyIp; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var integer |
52
|
|
|
* @ORM\Column(name="proxy_port_http", type="integer", nullable=true) |
53
|
|
|
*/ |
54
|
|
|
private $proxyPortHttp; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @var integer |
58
|
|
|
* @ORM\Column(name="proxy_port_socks", type="integer", nullable=true) |
59
|
|
|
*/ |
60
|
|
|
private $proxyPortSocks; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var integer |
64
|
|
|
* @ORM\Column(name="proxy_region_id", type="integer", nullable=true) |
65
|
|
|
*/ |
66
|
|
|
private $proxyRegionId; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @var string |
70
|
|
|
* @ORM\Column(name="proxy_region_name", type="string", nullable=true) |
71
|
|
|
*/ |
72
|
|
|
private $proxyRegionName; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @var string |
76
|
|
|
* @ORM\Column(name="proxy_region_country", type="string", nullable=true) |
77
|
|
|
*/ |
78
|
|
|
private $proxyRegionCountryName; |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var Plan |
82
|
|
|
* @ORM\OneToOne(targetEntity="Plan", fetch="EAGER") |
83
|
|
|
* @ORM\JoinColumn(name="proxy_plan", referencedColumnName="plan_id") |
84
|
|
|
*/ |
85
|
|
|
private $plan; |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @return int |
89
|
|
|
*/ |
90
|
|
|
public function getProxyId(): int |
91
|
|
|
{ |
92
|
|
|
return $this->proxyId; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @param int $proxyId |
97
|
|
|
* @return Proxy |
98
|
|
|
*/ |
99
|
|
|
public function setProxyId(int $proxyId): Proxy |
100
|
|
|
{ |
101
|
|
|
$this->proxyId = $proxyId; |
102
|
|
|
return $this; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* @return int |
107
|
|
|
*/ |
108
|
|
|
public function getProxyPlan(): int |
109
|
|
|
{ |
110
|
|
|
return $this->proxyPlan; |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @param int $proxyPlan |
115
|
|
|
* @return Proxy |
116
|
|
|
*/ |
117
|
|
|
public function setProxyPlan(int $proxyPlan): Proxy |
118
|
|
|
{ |
119
|
|
|
$this->proxyPlan = $proxyPlan; |
120
|
|
|
return $this; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return string |
125
|
|
|
*/ |
126
|
|
|
public function getProxyIp(): string |
127
|
|
|
{ |
128
|
|
|
return $this->proxyIp; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @param string $proxyIp |
133
|
|
|
* @return Proxy |
134
|
|
|
*/ |
135
|
|
|
public function setProxyIp(string $proxyIp): Proxy |
136
|
|
|
{ |
137
|
|
|
$this->proxyIp = $proxyIp; |
138
|
|
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @return int |
143
|
|
|
*/ |
144
|
|
|
public function getProxyPortHttp(): int |
145
|
|
|
{ |
146
|
|
|
return $this->proxyPortHttp; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* @param int $proxyPortHttp |
151
|
|
|
* @return Proxy |
152
|
|
|
*/ |
153
|
|
|
public function setProxyPortHttp(int $proxyPortHttp): Proxy |
154
|
|
|
{ |
155
|
|
|
$this->proxyPortHttp = $proxyPortHttp; |
156
|
|
|
return $this; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
/** |
160
|
|
|
* @return int |
161
|
|
|
*/ |
162
|
|
|
public function getProxyPortSocks(): int |
163
|
|
|
{ |
164
|
|
|
return $this->proxyPortSocks; |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
/** |
168
|
|
|
* @param int $proxyPortSocks |
169
|
|
|
* @return Proxy |
170
|
|
|
*/ |
171
|
|
|
public function setProxyPortSocks(int $proxyPortSocks): Proxy |
172
|
|
|
{ |
173
|
|
|
$this->proxyPortSocks = $proxyPortSocks; |
174
|
|
|
return $this; |
175
|
|
|
} |
176
|
|
|
|
177
|
|
|
/** |
178
|
|
|
* @return int |
179
|
|
|
*/ |
180
|
|
|
public function getProxyRegionId(): int |
181
|
|
|
{ |
182
|
|
|
return $this->proxyRegionId; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* @param int $proxyRegionId |
187
|
|
|
* @return Proxy |
188
|
|
|
*/ |
189
|
|
|
public function setProxyRegionId(int $proxyRegionId): Proxy |
190
|
|
|
{ |
191
|
|
|
$this->proxyRegionId = $proxyRegionId; |
192
|
|
|
return $this; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @return string |
197
|
|
|
*/ |
198
|
|
|
public function getProxyRegionName(): string |
199
|
|
|
{ |
200
|
|
|
return $this->proxyRegionName; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @param string $proxyRegionName |
205
|
|
|
* @return Proxy |
206
|
|
|
*/ |
207
|
|
|
public function setProxyRegionName(string $proxyRegionName): Proxy |
208
|
|
|
{ |
209
|
|
|
$this->proxyRegionName = $proxyRegionName; |
210
|
|
|
return $this; |
211
|
|
|
} |
212
|
|
|
|
213
|
|
|
/** |
214
|
|
|
* @return string |
215
|
|
|
*/ |
216
|
|
|
public function getProxyRegionCountryName(): string |
217
|
|
|
{ |
218
|
|
|
return $this->proxyRegionCountryName; |
219
|
|
|
} |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* @param string $proxyRegionCountry |
223
|
|
|
* @return Proxy |
224
|
|
|
*/ |
225
|
|
|
public function setProxyRegionCountryName(string $proxyRegionCountry): Proxy |
226
|
|
|
{ |
227
|
|
|
$this->proxyRegionCountryName = $proxyRegionCountry; |
228
|
|
|
return $this; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* @return Plan |
233
|
|
|
*/ |
234
|
|
|
public function getPlan(): Plan |
235
|
|
|
{ |
236
|
|
|
return $this->plan; |
237
|
|
|
} |
238
|
|
|
|
239
|
|
|
/** |
240
|
|
|
* @param Plan $plan |
241
|
|
|
* @return Proxy |
242
|
|
|
*/ |
243
|
|
|
public function setPlan(Plan $plan): Proxy |
244
|
|
|
{ |
245
|
|
|
$this->plan = $plan; |
246
|
|
|
return $this; |
247
|
|
|
} |
248
|
|
|
} |
249
|
|
|
|