Files
portal/app/app/Models/TenantRequisites.php
T
Дмитрий 2eaa78f95b
Accessibility (Pa11y live) / a11y (push) Has been cancelled
SAST — Semgrep / Semgrep SAST scan (push) Has been cancelled
fix(stan): Larastan-долг G1/G6 = 0 ошибок (реальные баги — починены, не спрятаны)
Продуктовый код (фиксы, не 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>
2026-06-19 12:40:00 +03:00

60 lines
1.9 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\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',
];
}
}