df19af99f9
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
41 lines
890 B
PHP
41 lines
890 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class AutopodborRun extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'kind',
|
|
'status',
|
|
'region_code',
|
|
'params',
|
|
'competitor_id',
|
|
'price_rub_charged',
|
|
'balance_transaction_id',
|
|
'error_code',
|
|
'started_at',
|
|
'finished_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'params' => 'array',
|
|
'price_rub_charged' => 'decimal:2',
|
|
'started_at' => 'datetime',
|
|
'finished_at' => 'datetime',
|
|
'created_at' => 'datetime',
|
|
];
|
|
|
|
public function competitors(): HasMany
|
|
{
|
|
return $this->hasMany(AutopodborCompetitor::class, 'search_run_id');
|
|
}
|
|
}
|