'pending']; protected function casts(): array { return ['includes_tax' => 'boolean', 'ceiling_minor' => 'integer']; } protected static function booted(): void { static::updating(function (InvestmentPolicy $policy) { if ($policy->getRawOriginal('status') !== 'pending' || array_diff(array_keys($policy->getDirty()), ['status', 'decided_at', 'updated_at']) !== []) { throw new \LogicException('Preservar os parâmetros e as decisões da regra.'); } }); static::deleting(fn () => throw new \LogicException('Preservar versões de investimento.')); } }