*/ public function abilityMap(): array { return [ 'can_update' => 'core.admin.identity.policies.update', 'can_delete' => 'core.admin.identity.policies.update', ]; } /** * 리소스를 배열로 변환합니다. * * @param Request $request HTTP 요청 객체 * @return array 직렬화된 정책 데이터 */ public function toArray(Request $request): array { return [ 'id' => $this->id, 'key' => $this->key, 'scope' => $this->scope, 'target' => $this->target, 'purpose' => $this->purpose, 'provider_id' => $this->provider_id, 'grace_minutes' => (int) $this->grace_minutes, 'enabled' => (bool) $this->enabled, 'priority' => (int) $this->priority, 'conditions' => $this->conditions, 'source_type' => $this->source_type, 'source_identifier' => $this->source_identifier, 'applies_to' => $this->applies_to, 'fail_mode' => $this->fail_mode, 'user_overrides' => $this->user_overrides ?? [], ...$this->formatTimestamps(), ...$this->resourceMeta($request), ]; } }