fix(core,admin_basic,board,ecommerce,page,gdpr,verification): 설정 미러·자동 정리·탈퇴 원자성·일괄 선택 범위 정비
공개이슈 ··· 및 그 전수 해소분. - 설정 저장·복원·초기화가 상주 프로세스 미러를 갱신하도록 단일 소유자화 - 만료 데이터 자동 정리 예약 12종 신설, 파기는 기본키 배치로 분할 - 회원 탈퇴를 전 경로 원자화하고 관리자 상태변경 경로를 정식 탈퇴로 통일 - 일괄 처리 목록의 선택을 화면에 보이는 행으로 한정(selectionScope) - 비밀번호 정책 문구를 도메인 중립 라벨로 정정 - 정적 검사 2종·검증 스킬 설계 정합성 축 신설
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Contracts\Repositories\NotificationLogRepositoryInterface;
|
||||
use App\Enums\NotificationLogStatus;
|
||||
use App\Models\NotificationLog;
|
||||
use App\Models\User;
|
||||
use App\Repositories\Concerns\DeletesInBatches;
|
||||
use App\Repositories\Concerns\PaginatesWithDeferredJoin;
|
||||
use App\Repositories\Concerns\ResolvesSortSpec;
|
||||
use App\Support\Query\KeysetPaginator;
|
||||
@@ -17,6 +18,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
|
||||
|
||||
class NotificationLogRepository implements NotificationLogRepositoryInterface
|
||||
{
|
||||
use DeletesInBatches;
|
||||
use PaginatesWithDeferredJoin;
|
||||
use ResolvesSortSpec;
|
||||
|
||||
@@ -98,6 +100,22 @@ class NotificationLogRepository implements NotificationLogRepositoryInterface
|
||||
return NotificationLog::whereIn('id', $ids)->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* 보존 기간이 지난 발송 이력을 삭제합니다.
|
||||
*
|
||||
* 보존 기간 하한(1일)은 이 계층이 소유한다 — 파기는 되돌릴 수 없으므로 호출자마다
|
||||
* 다시 막지 않고 실제로 지우는 자리에서 한 번 막는다.
|
||||
*
|
||||
* @param int $days 보존 기간 (일)
|
||||
* @return int 삭제된 건수
|
||||
*/
|
||||
public function deleteOlderThan(int $days): int
|
||||
{
|
||||
return $this->deleteInBatches(
|
||||
NotificationLog::where('created_at', '<', now()->subDays(max(1, $days)))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 페이지네이션 목록 조회.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user