@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToTenant;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use LogicException;
|
||||
|
||||
/** @property list<string> $families */
|
||||
class PrivateAuditExport extends Model
|
||||
{
|
||||
use BelongsToTenant;
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $hidden = ['path', 'input_hash'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['families' => 'array', 'manifest' => 'array', 'created_at' => 'datetime', 'size' => 'integer'];
|
||||
}
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::updating(fn () => throw new LogicException('Preservar o pacote e o manifesto originais da auditoria.'));
|
||||
static::deleting(fn () => throw new LogicException('Preservar o histórico da exportação privada.'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user