Files
compras/app/Models/SupplierBankDetail.php
T
nala 12dd6df28a
tests / ci (push) Waiting to run
commit melhorias compras1
2026-11-21 21:04:40 +02:00

42 lines
1.2 KiB
PHP

<?php
namespace App\Models;
use App\Models\Concerns\AppendOnlyInventoryRecord;
use App\Models\Concerns\BelongsToTenant;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
/** @property int $id
* @property int $tenant_id
* @property int $supplier_id
* @property int $created_by
* @property int $revision
* @property string $account_identifier
* @property string $beneficiary
* @property string|null $account_key
*/
class SupplierBankDetail extends Model
{
use AppendOnlyInventoryRecord, BelongsToTenant;
public $timestamps = false;
protected $guarded = ['id'];
protected $hidden = ['account_identifier', 'beneficiary', 'evidence_reference', 'reason'];
protected function casts(): array
{
return ['account_identifier' => 'encrypted', 'beneficiary' => 'encrypted', 'evidence_reference' => 'encrypted', 'reason' => 'encrypted'];
}
/** Missing column means the preserved legacy chain, including before installation.
* @return Attribute<string|null,never>
*/
protected function accountKey(): Attribute
{
return Attribute::get(fn (?string $value): ?string => $value);
}
}