feat(mng): 게시판-메뉴 자동 연동 및 URL 패턴 변경
## 주요 변경사항
### 게시판-메뉴 자동 연동
- 게시판 생성 시 메뉴 자동 생성 (BoardService.createBoardFromTemplate)
- 게시판 삭제 시 연결 메뉴 함께 삭제 (Soft Delete 연동)
- 게시판 복원 시 메뉴 재생성
- 게시판 영구삭제 시 메뉴 영구삭제
### 게시판 메뉴 보호
- MenuService: 게시판 연동 메뉴 수동 수정/삭제 방지
- isBoardMenuUrl(), isBoardMenu(), validateNotBoardUrl() 헬퍼 추가
- 8개 CRUD 메서드에 검증 로직 적용
### URL 패턴 변경
- 시스템 게시판: /system-boards/{code} → /customer-center/{code}
- 테넌트 게시판: /boards/{code} (변경 없음)
### UI 개선
- 메뉴 목록에서 게시판 메뉴 "📋 게시판" 뱃지 표시
- 게시판 메뉴는 수정/삭제 버튼 숨김 (활성/숨김 토글만 허용)
- 삭제된 게시판 행 클릭 시 404 오류 수정
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models\Boards;
|
||||
|
||||
use App\Models\Tenants\Tenant;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -109,6 +110,11 @@ public function posts(): HasMany
|
||||
return $this->hasMany(Post::class, 'board_id');
|
||||
}
|
||||
|
||||
public function tenant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Tenant::class, 'tenant_id');
|
||||
}
|
||||
|
||||
public function creator(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
|
||||
Reference in New Issue
Block a user