Files
portal/app/app/Models/FailedWebhookJob.php
T
Дмитрий dffefe7fc0 docs(billing): Phase 3 cleanup — refresh orphan comments to live classes
After ProcessWebhookJob/WebhookReceiveController removal — обновлены 8
docblock/inline комментариев, ссылавшихся на удалённый код:

- DealController: ProcessWebhookJob → SupplierWebhookController/RouteSupplierLeadJob
- SupplierWebhookController: убрана legacy backward-compat note
- ImportLeadsJob: паритет с RouteSupplierLeadJob
- RouteSupplierLeadJob: убрана ссылка на ProcessWebhookJob-pattern
- NewLeadNotification mailable: триггер в RouteSupplierLeadJob
- FailedWebhookJob model: ссылка на RouteSupplierLeadJob::failed()
- SupplierLeadCost model: создаётся в LedgerService::chargeForDelivery
- CsvLeadsParser: паритет с RouteSupplierLeadJob парсером

Code-функциональность не затронута, только doc-rot fix.
2026-05-24 18:51:16 +03:00

58 lines
1.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Webhook-job упавший после 3 ретраев (см. RouteSupplierLeadJob::failed()).
*
* Tenant-aware с RLS. Хранит raw payload + текст исключения для ручного
* retry из админки SaaS (`retried_at`/`retried_by` заполняются админом).
*
* Источник: db/schema.sql v8.7 §6, table `failed_webhook_jobs`.
*
* @mixin IdeHelperFailedWebhookJob
*/
class FailedWebhookJob extends Model
{
public $timestamps = false;
protected $table = 'failed_webhook_jobs';
protected $fillable = [
'tenant_id',
'webhook_log_id',
'raw_payload',
'exception',
'retry_count',
'failed_at',
'retried_at',
'retried_by',
'resolved_at',
];
protected function casts(): array
{
return [
'tenant_id' => 'integer',
'webhook_log_id' => 'integer',
'raw_payload' => 'array',
'retry_count' => 'integer',
'retried_by' => 'integer',
'failed_at' => 'datetime',
'retried_at' => 'datetime',
'resolved_at' => 'datetime',
];
}
/** @return BelongsTo<Tenant, $this> */
public function tenant(): BelongsTo
{
return $this->belongsTo(Tenant::class);
}
}