chore: API Flow Tester 설정 및 문서 업데이트

- flow-tester-auth.json: 인증 API 테스트 설정 추가
- flow-tester-client.json: Client API 테스트 설정 업데이트
- flow-tester-item-master.json: ItemMaster API 테스트 설정 추가
- LOGICAL_RELATIONSHIPS.md: 논리 관계 문서 업데이트
This commit is contained in:
2025-12-04 22:22:46 +09:00
parent 2b57910ca5
commit c946fa457c
4 changed files with 273 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
# 논리적 데이터베이스 관계 문서
> **자동 생성**: 2025-12-03 15:19:21
> **자동 생성**: 2025-12-04 20:56:47
> **소스**: Eloquent 모델 관계 분석
## 📊 모델별 관계 현황
@@ -332,6 +332,27 @@ ### lot_sales
- **lot()**: belongsTo → `lots`
### quotes
**모델**: `App\Models\Quote\Quote`
- **client()**: belongsTo → `clients`
- **finalizer()**: belongsTo → `users`
- **creator()**: belongsTo → `users`
- **updater()**: belongsTo → `users`
- **items()**: hasMany → `quote_items`
- **revisions()**: hasMany → `quote_revisions`
### quote_items
**모델**: `App\Models\Quote\QuoteItem`
- **quote()**: belongsTo → `quotes`
### quote_revisions
**모델**: `App\Models\Quote\QuoteRevision`
- **quote()**: belongsTo → `quotes`
- **reviser()**: belongsTo → `users`
### departments
**모델**: `App\Models\Tenants\Department`

View File

@@ -0,0 +1,85 @@
{
"name": "인증 플로우 테스트",
"description": "로그인, 프로필 조회, 토큰 갱신, 로그아웃 플로우를 테스트합니다.",
"version": "1.0",
"config": {
"apiKey": "42Jfwc6EaRQ04GNRmLR5kzJp5UudSOzGGqjmdk1a",
"baseUrl": "https://api.sam.kr/api/v1",
"timeout": 30000,
"stopOnFailure": true
},
"variables": {
"user_id": "codebridgex",
"user_pwd": "code1234"
},
"steps": [
{
"id": "login",
"name": "로그인",
"method": "POST",
"endpoint": "/login",
"body": {
"user_id": "{{variables.user_id}}",
"user_pwd": "{{variables.user_pwd}}"
},
"extract": {
"accessToken": "$.access_token",
"refreshToken": "$.refresh_token"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString"
}
}
},
{
"id": "get_profile",
"name": "프로필 조회",
"method": "GET",
"endpoint": "/users/me",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"dependsOn": ["login"],
"expect": {
"status": [200],
"jsonPath": {
"$.success": true
}
}
},
{
"id": "refresh_token",
"name": "토큰 갱신",
"method": "POST",
"endpoint": "/refresh",
"body": {
"refresh_token": "{{login.refreshToken}}"
},
"dependsOn": ["get_profile"],
"extract": {
"newToken": "$.access_token"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString"
}
}
},
{
"id": "logout",
"name": "로그아웃",
"method": "POST",
"endpoint": "/logout",
"headers": {
"Authorization": "Bearer {{refresh_token.newToken}}"
},
"dependsOn": ["refresh_token"],
"expect": {
"status": [200, 204]
}
}
]
}

View File

@@ -42,7 +42,7 @@
"Authorization": "Bearer {{login.token}}"
},
"body": {
"client_code": "{{test_client_code}}",
"client_code": "{{variables.test_client_code}}",
"name": "테스트 거래처",
"contact_person": "홍길동",
"phone": "02-1234-5678",
@@ -58,7 +58,7 @@
"jsonPath": {
"$.success": true,
"$.data.id": "@isNumber",
"$.data.client_code": "{{test_client_code}}",
"$.data.client_code": "{{variables.test_client_code}}",
"$.data.name": "테스트 거래처",
"$.data.business_no": "123-45-67890",
"$.data.business_type": "제조업",
@@ -73,15 +73,10 @@
"id": "list_clients",
"name": "3. 거래처 목록 조회",
"method": "GET",
"endpoint": "/clients",
"endpoint": "/clients?page=1&size=20&q=테스트",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"params": {
"page": 1,
"size": 20,
"q": "테스트"
},
"expect": {
"status": [200],
"jsonPath": {
@@ -104,7 +99,7 @@
"jsonPath": {
"$.success": true,
"$.data.id": "{{create_client.client_id}}",
"$.data.client_code": "{{test_client_code}}",
"$.data.client_code": "{{variables.test_client_code}}",
"$.data.business_no": "123-45-67890",
"$.data.business_type": "제조업",
"$.data.business_item": "전자부품"
@@ -140,7 +135,7 @@
},
{
"id": "toggle_client",
"name": "6. 거래처 활성/비활성 토글",
"name": "6. 거래처 활성/비활성 토글 (N으로)",
"method": "PATCH",
"endpoint": "/clients/{{create_client.client_id}}/toggle",
"headers": {
@@ -150,7 +145,7 @@
"status": [200],
"jsonPath": {
"$.success": true,
"$.data.is_active": "N"
"$.data.is_active": false
}
}
},
@@ -166,7 +161,7 @@
"status": [200],
"jsonPath": {
"$.success": true,
"$.data.is_active": "Y"
"$.data.is_active": true
}
}
},
@@ -174,13 +169,10 @@
"id": "list_active_only",
"name": "8. 활성 거래처만 조회",
"method": "GET",
"endpoint": "/clients",
"endpoint": "/clients?only_active=1",
"headers": {
"Authorization": "Bearer {{login.token}}"
},
"params": {
"only_active": true
},
"expect": {
"status": [200],
"jsonPath": {
@@ -220,4 +212,4 @@
}
}
]
}
}

View File

@@ -0,0 +1,157 @@
{
"name": "품목기준관리 통합 테스트",
"description": "품목기준관리 API의 전체 CRUD 플로우를 테스트합니다.",
"version": "1.0",
"config": {
"apiKey": "42Jfwc6EaRQ04GNRmLR5kzJp5UudSOzGGqjmdk1a",
"baseUrl": "https://api.sam.kr/api/v1",
"timeout": 30000,
"stopOnFailure": true
},
"variables": {
"user_id": "codebridgex",
"user_pwd": "code1234",
"testItemCode": "TEST-ITEM-{{$timestamp}}",
"testItemName": "테스트 품목",
"testItemSpec": "100x100x10",
"updatedItemName": "수정된 테스트 품목",
"updatedItemSpec": "200x200x20"
},
"steps": [
{
"id": "login",
"name": "로그인",
"method": "POST",
"endpoint": "/login",
"body": {
"user_id": "{{variables.user_id}}",
"user_pwd": "{{variables.user_pwd}}"
},
"extract": {
"accessToken": "$.access_token"
},
"expect": {
"status": [200],
"jsonPath": {
"$.access_token": "@isString"
}
}
},
{
"id": "create_item",
"name": "품목 생성",
"method": "POST",
"endpoint": "/item-master-data",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"body": {
"item_code": "{{variables.testItemCode}}",
"item_name": "{{variables.testItemName}}",
"item_spec": "{{variables.testItemSpec}}",
"item_type": "PRODUCT",
"unit": "EA",
"is_active": true
},
"dependsOn": ["login"],
"extract": {
"createdItemId": "$.data.id",
"createdItemCode": "$.data.item_code"
},
"expect": {
"status": [201],
"jsonPath": {
"$.data.id": "@exists"
}
}
},
{
"id": "get_item",
"name": "품목 단건 조회",
"method": "GET",
"endpoint": "/item-master-data/{{create_item.createdItemId}}",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"dependsOn": ["create_item"],
"expect": {
"status": [200],
"jsonPath": {
"$.data.id": "@exists"
}
}
},
{
"id": "list_items",
"name": "품목 목록 조회",
"method": "GET",
"endpoint": "/item-master-data",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"dependsOn": ["create_item"],
"expect": {
"status": [200],
"jsonPath": {
"$.data": "@isArray"
}
}
},
{
"id": "update_item",
"name": "품목 수정",
"method": "PUT",
"endpoint": "/item-master-data/{{create_item.createdItemId}}",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"body": {
"item_name": "{{variables.updatedItemName}}",
"item_spec": "{{variables.updatedItemSpec}}"
},
"dependsOn": ["get_item"],
"expect": {
"status": [200]
}
},
{
"id": "verify_update",
"name": "수정 확인",
"method": "GET",
"endpoint": "/item-master-data/{{create_item.createdItemId}}",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"dependsOn": ["update_item"],
"expect": {
"status": [200]
}
},
{
"id": "delete_item",
"name": "품목 삭제",
"method": "DELETE",
"endpoint": "/item-master-data/{{create_item.createdItemId}}",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"dependsOn": ["verify_update"],
"expect": {
"status": [200]
}
},
{
"id": "verify_delete",
"name": "삭제 확인",
"method": "GET",
"endpoint": "/item-master-data/{{create_item.createdItemId}}",
"headers": {
"Authorization": "Bearer {{login.accessToken}}"
},
"dependsOn": ["delete_item"],
"expect": {
"status": [404]
}
}
]
}