where('unique_key', $uniqueKey); } // ========================================================================= // 헬퍼 메서드 // ========================================================================= public static function getByUniqueKeys(int $tenantId, array $uniqueKeys) { return static::where('tenant_id', $tenantId) ->whereIn('unique_key', $uniqueKeys) ->get() ->keyBy('unique_key'); } public static function saveOverride(int $tenantId, string $uniqueKey, ?string $modifiedSummary, ?string $modifiedCast): self { return static::updateOrCreate( ['tenant_id' => $tenantId, 'unique_key' => $uniqueKey], ['modified_summary' => $modifiedSummary, 'modified_cast' => $modifiedCast] ); } }