이동된 파일: - 2025-12-02_file-attachment-feature.md - ai-config-설정.md - archive-restore-feature-analysis.md - barobill-members-migration.md - super-admin-protection.md - 명함추출로직.md - 모달창_생성시_유의사항.md - 상품관리정보.md - 수당지급.md - 영업파트너구조.md - 홈택스 매입매출 조회성공.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.0 KiB
4.0 KiB
바로빌 회원사관리 - 레거시 마이그레이션 계획
레거시 소스:
sam/sales/barobill/registration/index.php
1. 레거시 분석
기술 스택
- Frontend: React 18 + Babel (브라우저 트랜스파일링)
- Backend: PHP + PDO (api.php)
- UI: Tailwind CSS + Lucide Icons
데이터베이스 구조 (barobill_members 테이블)
| 필드명 | 타입 | 설명 |
|---|---|---|
id |
INT | PK, Auto Increment |
biz_no |
VARCHAR | 사업자번호 (Unique) |
corp_name |
VARCHAR | 상호명 |
ceo_name |
VARCHAR | 대표자명 |
addr |
VARCHAR | 주소 |
biz_type |
VARCHAR | 업태 |
biz_class |
VARCHAR | 종목 |
barobill_id |
VARCHAR | 바로빌 아이디 |
barobill_pwd |
VARCHAR | 바로빌 비밀번호 (해시) |
manager_name |
VARCHAR | 담당자명 |
manager_email |
VARCHAR | 담당자 이메일 |
manager_hp |
VARCHAR | 담당자 전화번호 |
created_at |
TIMESTAMP | 생성일시 |
API 엔드포인트 (레거시)
| Method | Endpoint | 설명 |
|---|---|---|
| GET | api.php |
전체 목록 조회 |
| GET | api.php?id={id} |
단일 조회 |
| POST | api.php |
신규 등록 (사업자번호 중복 체크) |
| PUT | api.php |
정보 수정 |
| DELETE | api.php?id={id} |
삭제 |
UI 기능
-
통계 카드 (4개)
- 연동 회원사 수 (DB 실시간)
- API 키 상태
- 트래픽 상태
- 서버 상태
-
탭 네비게이션
- 목록 조회
- 신규 등록
-
목록 테이블 컬럼
- 사업자번호
- 상호 / 대표자
- 바로빌 ID
- 담당자 정보
- 작업 (수정/삭제)
-
등록 폼 필드
- 사업자번호 (필수)
- 상호명 (필수)
- 대표자명 (필수)
- 업태
- 종목
- 주소
- 바로빌 아이디 (필수, 등록 시만)
- 비밀번호 (필수, 등록 시만)
- 담당자명
- 담당자 HP
- 담당자 이메일
- 자동완성 버튼 (테스트 데이터 입력)
-
수정 모달
- 등록 폼과 동일 (아이디/비밀번호 제외)
2. Laravel 마이그레이션 계획
생성할 파일 목록
Model & Migration
app/Models/BarobillMember.php
database/migrations/xxxx_create_barobill_members_table.php
Controller
app/Http/Controllers/Barobill/BarobillController.php (이미 생성됨)
app/Http/Controllers/Api/Admin/BarobillController.php (API용)
Views
resources/views/barobill/members/index.blade.php (이미 생성됨 - 업데이트 필요)
resources/views/barobill/members/partials/table.blade.php
resources/views/barobill/members/partials/form.blade.php
resources/views/barobill/members/partials/modal-edit.blade.php
Routes
// Web Routes (이미 추가됨)
Route::prefix('barobill')->name('barobill.')->group(function () {
Route::get('/members', [BarobillController::class, 'members'])->name('members.index');
});
// API Routes (추가 필요)
Route::prefix('barobill')->name('barobill.')->group(function () {
Route::get('/members', [BarobillApiController::class, 'index']);
Route::get('/members/{id}', [BarobillApiController::class, 'show']);
Route::post('/members', [BarobillApiController::class, 'store']);
Route::put('/members/{id}', [BarobillApiController::class, 'update']);
Route::delete('/members/{id}', [BarobillApiController::class, 'destroy']);
});
구현 순서
- Migration 생성 및 실행
- Model 생성 (fillable, casts 설정)
- API Controller 생성 (CRUD)
- API Routes 추가
- View 업데이트 (HTMX + Blade)
- 통계 카드
- 탭 (목록/등록)
- 테이블 (HTMX 로드)
- 등록 폼
- 수정 모달
- 테스트
3. 참고 사항
레거시 코드 위치
- Frontend:
sam/sales/barobill/registration/index.php - Backend API:
sam/sales/barobill/registration/api.php
주의 사항
- 사업자번호 중복 체크 로직 필요
- 비밀번호는 해시 저장 (password_hash)
- 바로빌 API 연동은 별도 Service 클래스로 분리 권장