Skip to content

Commit 8868de3

Browse files
committed
Issue #512: Implemented browsecap
Signed-off-by: bota <Bota@dotkernel.com>
1 parent 8300755 commit 8868de3

1 file changed

Lines changed: 27 additions & 97 deletions

File tree

src/Core/src/Admin/src/Entity/AdminLogin.php

Lines changed: 27 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ class AdminLogin extends AbstractEntity
3939
#[ORM\Column(name: 'deviceType', type: 'string', length: 191, nullable: true)]
4040
protected ?string $deviceType = null;
4141

42-
#[ORM\Column(name: 'deviceBrand', type: 'string', length: 191, nullable: true)]
43-
protected ?string $deviceBrand = null;
44-
45-
#[ORM\Column(name: 'deviceModel', type: 'string', length: 40, nullable: true)]
46-
protected ?string $deviceModel = null;
47-
4842
#[ORM\Column(type: 'yes_no_enum', nullable: true, enumType: YesNoEnum::class)]
4943
protected YesNoEnum $isMobile = YesNoEnum::No;
5044

@@ -54,20 +48,14 @@ class AdminLogin extends AbstractEntity
5448
#[ORM\Column(name: 'osVersion', type: 'string', length: 191, nullable: true)]
5549
protected ?string $osVersion = null;
5650

57-
#[ORM\Column(name: 'osPlatform', type: 'string', length: 191, nullable: true)]
58-
protected ?string $osPlatform = null;
59-
6051
#[ORM\Column(name: 'clientType', type: 'string', length: 191, nullable: true)]
6152
protected ?string $clientType = null;
6253

6354
#[ORM\Column(name: 'clientName', type: 'string', length: 191, nullable: true)]
6455
protected ?string $clientName = null;
6556

66-
#[ORM\Column(name: 'clientEngine', type: 'string', length: 191, nullable: true)]
67-
protected ?string $clientEngine = null;
68-
69-
#[ORM\Column(name: 'clientVersion', type: 'string', length: 191, nullable: true)]
70-
protected ?string $clientVersion = null;
57+
#[ORM\Column(type: 'yes_no_enum', nullable: true, enumType: YesNoEnum::class)]
58+
protected YesNoEnum $isCrawler = YesNoEnum::No;
7159

7260
#[ORM\Column(type: 'success_failure_enum', nullable: true, enumType: SuccessFailureEnum::class)]
7361
protected SuccessFailureEnum $loginStatus = SuccessFailureEnum::Fail;
@@ -144,30 +132,6 @@ public function setDeviceType(?string $deviceType): self
144132
return $this;
145133
}
146134

147-
public function getDeviceBrand(): ?string
148-
{
149-
return $this->deviceBrand;
150-
}
151-
152-
public function setDeviceBrand(?string $deviceBrand): self
153-
{
154-
$this->deviceBrand = $deviceBrand;
155-
156-
return $this;
157-
}
158-
159-
public function getDeviceModel(): ?string
160-
{
161-
return $this->deviceModel;
162-
}
163-
164-
public function setDeviceModel(?string $deviceModel): self
165-
{
166-
$this->deviceModel = $deviceModel;
167-
168-
return $this;
169-
}
170-
171135
public function getIsMobile(): ?YesNoEnum
172136
{
173137
return $this->isMobile;
@@ -204,18 +168,6 @@ public function setOsVersion(?string $osVersion): self
204168
return $this;
205169
}
206170

207-
public function getOsPlatform(): ?string
208-
{
209-
return $this->osPlatform;
210-
}
211-
212-
public function setOsPlatform(?string $osPlatform): self
213-
{
214-
$this->osPlatform = $osPlatform;
215-
216-
return $this;
217-
}
218-
219171
public function getClientType(): ?string
220172
{
221173
return $this->clientType;
@@ -240,40 +192,26 @@ public function setClientName(?string $clientName): self
240192
return $this;
241193
}
242194

243-
public function getClientEngine(): ?string
244-
{
245-
return $this->clientEngine;
246-
}
247-
248-
public function setClientEngine(?string $clientEngine): self
249-
{
250-
$this->clientEngine = $clientEngine;
251-
252-
return $this;
253-
}
254-
255-
public function getClientVersion(): ?string
195+
public function getLoginStatus(): ?SuccessFailureEnum
256196
{
257-
return $this->clientVersion;
197+
return $this->loginStatus;
258198
}
259199

260-
public function setClientVersion(?string $clientVersion): self
200+
public function setLoginStatus(SuccessFailureEnum $loginStatus): self
261201
{
262-
$this->clientVersion = $clientVersion;
202+
$this->loginStatus = $loginStatus;
263203

264204
return $this;
265205
}
266206

267-
public function getLoginStatus(): ?SuccessFailureEnum
207+
public function getIsCrawler(): YesNoEnum
268208
{
269-
return $this->loginStatus;
209+
return $this->isCrawler;
270210
}
271211

272-
public function setLoginStatus(SuccessFailureEnum $loginStatus): self
212+
public function setIsCrawler(YesNoEnum $isCrawler): void
273213
{
274-
$this->loginStatus = $loginStatus;
275-
276-
return $this;
214+
$this->isCrawler = $isCrawler;
277215
}
278216

279217
/**
@@ -285,16 +223,12 @@ public function setLoginStatus(SuccessFailureEnum $loginStatus): self
285223
* continent: string|null,
286224
* organization: string|null,
287225
* deviceType: string|null,
288-
* deviceBrand: string|null,
289-
* deviceModel: string|null,
290226
* isMobile: string,
291227
* osName: string|null,
292228
* osVersion: string|null,
293-
* osPlatform: string|null,
294229
* clientType: string|null,
295230
* clientName: string|null,
296-
* clientEngine: string|null,
297-
* clientVersion: string|null,
231+
* isCrawler: 'no'|'yes',
298232
* loginStatus: string,
299233
* created: DateTimeImmutable|null,
300234
* updated: DateTimeImmutable|null,
@@ -303,26 +237,22 @@ public function setLoginStatus(SuccessFailureEnum $loginStatus): self
303237
public function getArrayCopy(): array
304238
{
305239
return [
306-
'id' => $this->id->toString(),
307-
'identity' => $this->identity,
308-
'adminIp' => $this->adminIp,
309-
'country' => $this->country,
310-
'continent' => $this->continent,
311-
'organization' => $this->organization,
312-
'deviceType' => $this->deviceType,
313-
'deviceBrand' => $this->deviceBrand,
314-
'deviceModel' => $this->deviceModel,
315-
'isMobile' => $this->isMobile->value,
316-
'osName' => $this->osName,
317-
'osVersion' => $this->osVersion,
318-
'osPlatform' => $this->osPlatform,
319-
'clientType' => $this->clientType,
320-
'clientName' => $this->clientName,
321-
'clientEngine' => $this->clientEngine,
322-
'clientVersion' => $this->clientVersion,
323-
'loginStatus' => $this->loginStatus->value,
324-
'created' => $this->created,
325-
'updated' => $this->updated,
240+
'id' => $this->id->toString(),
241+
'identity' => $this->identity,
242+
'adminIp' => $this->adminIp,
243+
'country' => $this->country,
244+
'continent' => $this->continent,
245+
'organization' => $this->organization,
246+
'deviceType' => $this->deviceType,
247+
'isMobile' => $this->isMobile->value,
248+
'osName' => $this->osName,
249+
'osVersion' => $this->osVersion,
250+
'clientType' => $this->clientType,
251+
'clientName' => $this->clientName,
252+
'isCrawler' => $this->isCrawler->value,
253+
'loginStatus' => $this->loginStatus->value,
254+
'created' => $this->created,
255+
'updated' => $this->updated,
326256
];
327257
}
328258
}

0 commit comments

Comments
 (0)