爬虫开发
This commit is contained in:
14
app/Enums/CrawlAlertSeverity.php
Normal file
14
app/Enums/CrawlAlertSeverity.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CrawlAlertSeverity: string
|
||||
{
|
||||
case Info = 'info';
|
||||
case Warning = 'warning';
|
||||
case Error = 'error';
|
||||
case Critical = 'critical';
|
||||
}
|
||||
|
||||
13
app/Enums/CrawlRunItemStatus.php
Normal file
13
app/Enums/CrawlRunItemStatus.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CrawlRunItemStatus: string
|
||||
{
|
||||
case Success = 'success';
|
||||
case Failed = 'failed';
|
||||
case Skipped = 'skipped';
|
||||
}
|
||||
|
||||
15
app/Enums/CrawlRunStatus.php
Normal file
15
app/Enums/CrawlRunStatus.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CrawlRunStatus: string
|
||||
{
|
||||
case Pending = 'pending';
|
||||
case Running = 'running';
|
||||
case Completed = 'completed';
|
||||
case Partial = 'partial';
|
||||
case Failed = 'failed';
|
||||
}
|
||||
|
||||
20
app/Enums/CrawlTargetModule.php
Normal file
20
app/Enums/CrawlTargetModule.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CrawlTargetModule: string
|
||||
{
|
||||
case Tool = 'tool';
|
||||
case Model = 'model';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Tool => 'AI 工具',
|
||||
self::Model => 'AI 模型',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
13
app/Enums/CrawlTriggerType.php
Normal file
13
app/Enums/CrawlTriggerType.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum CrawlTriggerType: string
|
||||
{
|
||||
case Schedule = 'schedule';
|
||||
case Manual = 'manual';
|
||||
case Retry = 'retry';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user