2eaa78f95b
Продуктовый код (фиксы, не baseline): TenantRequisites+SupplierLead — явные @property (ide-helper:models пропускал модели); DealsController V1 — лишний ?-> на non-null received_at; ScrubPii — guard instanceof Monolog. Тест-код: ImitationTestCase @param int; findByInn return-type. Baseline перегенерён — в нём ТОЛЬКО ложноположительные (Pest TestCall + защитный ?-> на nullable first() в debug-строках ScenarioBC), 0 продуктовых подавлений (проверено диффом). composer stan: 0. NB: столбцы lead-region (dadata_qc/phone_operator/region_source/resolved_subject_code) есть в БД, но отсутствуют в db/schema.sql — отдельный дрейф схемы. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
60 lines
1.9 KiB
PHP
60 lines
1.9 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
namespace App\Models;
|
||
|
||
use Illuminate\Database\Eloquent\Model;
|
||
use Illuminate\Support\Carbon;
|
||
|
||
/**
|
||
* Реквизиты тенанта (G1/SP2). 1:1 с tenants. RLS по tenant_id.
|
||
*
|
||
* Свойства аннотированы явно: `ide-helper:models` пропускает эту модель при
|
||
* интроспекции (стаб IdeHelperTenantRequisites не генерируется), поэтому
|
||
*
|
||
* @property-аннотации заданы вручную по db/schema.sql (tenant_requisites).
|
||
*
|
||
* @property int $id
|
||
* @property int $tenant_id
|
||
* @property string $subject_type
|
||
* @property string $contact_name
|
||
* @property string $contact_phone
|
||
* @property string|null $inn
|
||
* @property string|null $legal_name
|
||
* @property string|null $kpp
|
||
* @property string|null $ogrn
|
||
* @property string|null $legal_address
|
||
* @property string|null $bank_name
|
||
* @property string|null $bank_bik
|
||
* @property string|null $bank_account
|
||
* @property string|null $corr_account
|
||
* @property array<string, mixed>|null $dadata_raw
|
||
* @property Carbon|null $dadata_synced_at
|
||
* @property Carbon|null $requisites_completed_at
|
||
* @property Carbon|null $created_at
|
||
* @property Carbon|null $updated_at
|
||
*/
|
||
class TenantRequisites extends Model
|
||
{
|
||
protected $table = 'tenant_requisites';
|
||
|
||
protected $fillable = [
|
||
'tenant_id', 'subject_type', 'contact_name', 'contact_phone',
|
||
'inn', 'legal_name', 'kpp', 'ogrn', 'legal_address',
|
||
'bank_name', 'bank_bik', 'bank_account', 'corr_account',
|
||
'dadata_raw', 'dadata_synced_at', 'requisites_completed_at',
|
||
];
|
||
|
||
protected function casts(): array
|
||
{
|
||
return [
|
||
'dadata_raw' => 'array',
|
||
'dadata_synced_at' => 'datetime',
|
||
'requisites_completed_at' => 'datetime',
|
||
'created_at' => 'datetime',
|
||
'updated_at' => 'datetime',
|
||
];
|
||
}
|
||
}
|