게시판 게시글 반응 기능과 비즈뿌리오(카카오 알림톡·문자) 메시징 플러그인을 제거한다. 게시판 반응 - 마이그레이션 5종(반응 유형·반응·게시판 사용여부·활성 유형·게시글 카운트), 시더, 모델·저장소·서비스·컨트롤러·검증 규칙·예외·API 리소스 제거 - 관리자 게시판 폼/환경설정의 반응 사용 토글과 유형 선택 블록, 반응 유형 데이터소스 제거 - 사용자 게시글 상세의 반응 버튼 영역 제거 (반응 도입 이전 상태로 복원) - 반응 관련 다국어 키(ko/en/ja), API 문서, 시나리오 매니페스트, 단위·기능·E2E 테스트 제거 비즈뿌리오 메시징 플러그인 - 플러그인 본체와 일본어 번들 언어팩 제거 - 코어 문서·빌드 스크립트·검사 baseline, 게시판·이커머스 CHANGELOG 에 남아 있던 참조 정리 존치 항목 - 게시판·이커머스 알림 설정 행 하단의 확장 슬롯(notification_definition_row_footer)은 코어 알림 설정 화면과 동일한 범용 확장점이라 유지한다 - 사용자 템플릿의 PostReactions 컴포넌트는 반응 기능 도입 이전부터 존재하던 자산이라 유지한다 - 태그 입력 드롭다운이 하단 고정 버튼에 가려지던 수정은 반응 기능과 무관해 유지한다 부수 정정 - 라우팅 판정 diff 스냅샷 총량을 실측값으로 갱신한다. 기록값 463 은 제거 이전 시점에도 실제(471)와 어긋나 있었고, 이번 제거 후 실측은 469 다.
111 lines
3.9 KiB
PHP
111 lines
3.9 KiB
PHP
<?php
|
|
|
|
namespace Modules\Sirsoft\Board\Database\Seeders;
|
|
|
|
use App\Traits\HasSampleSeeders;
|
|
use App\Traits\HasSeederCounts;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
/**
|
|
* 게시판 모듈 메인 시더
|
|
*
|
|
* 설치 필수 시더는 항상 실행되며, 샘플 시더는 --sample 옵션 시에만 실행됩니다.
|
|
*
|
|
* 설치 시더:
|
|
* - BoardTypeSeeder
|
|
*
|
|
* 알림 정의는 module.php::getNotificationDefinitions() 가 SSoT 로,
|
|
* ModuleManager 가 activate/update 시 자동 동기화합니다 (시더 호출 불필요).
|
|
*
|
|
* 샘플 시더 (--sample 옵션 시):
|
|
* 1. BoardSampleSeeder - 게시판 8개 (테이블 + 권한 자동 생성)
|
|
* 2. PostSampleSeeder - 게시글/댓글 샘플 (총 160건)
|
|
* 3. ReportSampleSeeder - 신고 샘플 15~20건
|
|
* 4. BoardMailSendLogSeeder - 메일 발송 이력 샘플
|
|
*
|
|
* 실행 방법:
|
|
* php artisan module:seed sirsoft-board # 설치 시더만
|
|
* php artisan module:seed sirsoft-board --sample # 설치 + 샘플
|
|
*/
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use HasSampleSeeders;
|
|
use HasSeederCounts;
|
|
|
|
/**
|
|
* 시더 실행
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$this->command->info('');
|
|
$this->command->info('========================================');
|
|
$this->command->info(' 게시판 모듈 시더 시작');
|
|
$this->command->info('========================================');
|
|
$this->command->info('');
|
|
|
|
// 설치 필수 시더 (항상 실행)
|
|
$this->command->info('[설치] 게시판 타입 생성');
|
|
$this->call([
|
|
BoardTypeSeeder::class,
|
|
]);
|
|
$this->command->info('');
|
|
|
|
// 샘플 시더 (--sample 옵션 시에만 실행)
|
|
if ($this->shouldIncludeSample()) {
|
|
$this->command->info('--- 게시판 샘플 시더 실행 ---');
|
|
$this->command->info('');
|
|
|
|
// 1. 게시판 샘플 생성 (테이블 + 권한 자동, count 불필요)
|
|
$this->command->info('[1/5] 게시판 샘플 생성');
|
|
$this->call(Sample\BoardSampleSeeder::class);
|
|
$this->command->info('');
|
|
|
|
// 2. 게시글/댓글 샘플 생성 (count-aware)
|
|
$this->command->info('[2/5] 게시글/댓글 샘플 생성');
|
|
$this->callWithCounts(Sample\PostSampleSeeder::class);
|
|
$this->command->info('');
|
|
|
|
// 3. 신고 샘플 생성 (count 불필요)
|
|
$this->command->info('[3/6] 신고 샘플 생성');
|
|
$this->call(Sample\ReportSampleSeeder::class);
|
|
$this->command->info('');
|
|
|
|
// 4. 알림 발송 이력 샘플 (count-aware)
|
|
$this->command->info('[4/6] 알림 발송 이력 샘플 생성');
|
|
$this->callWithCounts(Sample\NotificationLogSeeder::class);
|
|
$this->command->info('');
|
|
|
|
// 5. 본인인증 이력 샘플 (count-aware)
|
|
$this->command->info('[5/6] 본인인증 이력 샘플 생성');
|
|
$this->callWithCounts(Sample\IdentityVerificationLogSeeder::class);
|
|
$this->command->info('');
|
|
|
|
// 6. 활동 로그 샘플 (모든 샘플 데이터 생성 후 마지막에 실행)
|
|
$this->command->info('[6/6] 활동 로그 샘플 생성');
|
|
$this->call(ActivityLogSampleSeeder::class);
|
|
$this->command->info('');
|
|
}
|
|
|
|
$this->command->info('========================================');
|
|
$this->command->info(' 게시판 모듈 시더 완료!');
|
|
$this->command->info('========================================');
|
|
$this->command->info('');
|
|
}
|
|
|
|
/**
|
|
* 카운트 옵션을 전파하며 단일 시더를 실행합니다.
|
|
*
|
|
* @param class-string $class 시더 클래스
|
|
*/
|
|
private function callWithCounts(string $class): void
|
|
{
|
|
$seeder = $this->resolve($class);
|
|
|
|
if (method_exists($seeder, 'setSeederCounts')) {
|
|
$seeder->setSeederCounts($this->seederCounts);
|
|
}
|
|
|
|
$seeder->__invoke();
|
|
}
|
|
}
|