|
|
4 mesi fa | |
|---|---|---|
| .. | ||
| app | 4 mesi fa | |
| README.md | 4 mesi fa | |
기존 동작하는 코드를 기반으로 구성된 벤더-인플루언서 관계 관리 API
backend/
├── app/
│ ├── Config/
│ │ └── Routes.php # API 라우트 설정
│ ├── Controllers/
│ │ └── VendorInfluencerController.php # 메인 컨트롤러
│ └── Models/
│ ├── VendorInfluencerMappingModel.php # 벤더-인플루언서 매핑 모델
│ ├── VendorModel.php # 벤더사 모델
│ └── UserModel.php # 사용자 모델
└── README.md
POST /api/vendor-influencer/request - 승인요청 생성POST /api/vendor-influencer/requests - 요청목록 조회 (벤더사용)POST /api/vendor-influencer/process - 승인/거부 처리POST /api/vendor-influencer/cancel - 요청취소POST /api/vendor-influencer/list - 관계목록 조회 (인플루언서용)POST /api/vendor-influencer/detail - 상세 조회POST /api/vendor/search - 벤더사 검색 (인플루언서용)searchVendors)createRequest)getList)approveRequest)cancelRequest)getDetail)이 API는 기존 동작하는 코드와 100% 호환됩니다:
const response = await fetch('/api/vendor/search', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
keyword: '패션',
category: 'FASHION_BEAUTY',
region: 'SEOUL',
sortBy: 'latest',
page: 1,
size: 12,
influencerSeq: 123
})
});
const response = await fetch('/api/vendor-influencer/requests', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
vendorSeq: 456,
status: 'PENDING',
keyword: '인플루언서명',
sortBy: 'latest',
page: 1,
size: 12
})
});
const response = await fetch('/api/vendor-influencer/process', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
mappingSeq: 789,
action: 'APPROVE', // or 'REJECT'
processedBy: 456,
responseMessage: '승인합니다.'
})
});