fix : 테넌트 관리자 사용자 API 추가

- 사용자 목록
- 사용자 생성
- 사용자 단건 조회
- 사용자 수정
- 사용자 삭제(소프트 삭제)
- 활성/비활성 전환
- 삭제 복구
- 비밀번호 초기화

- 수정필요 : 역할부여, 역할 해재
This commit is contained in:
2025-08-15 16:32:11 +09:00
parent 9935bba84e
commit 06197a1366
7 changed files with 644 additions and 145 deletions

View File

@@ -257,6 +257,14 @@ public static function storeTenants(array $params = [])
$tenant = Tenant::create($payload);
// 기존 기본값(is_default=1) 해제
$apiUser = app('api_user');
UserTenant::withoutGlobalScopes()
->where('user_id', $apiUser)
->where('is_default', 1)
->update(['is_default' => 0]);
// 성성된 테넌트를 나의 테넌트로 셋팅
$apiUser = app('api_user');
UserTenant::create([