feat: 견적 단가 자동 적용 기능 추가

- 고객 그룹별 단가 조정 지원
- 견적 생성 시 자동 단가 조회
- 매출단가만 사용 (매입단가는 경고)
This commit is contained in:
2025-10-13 21:52:34 +09:00
parent be36073282
commit a6b06be61d
17 changed files with 3794 additions and 47 deletions

View File

@@ -532,11 +532,42 @@ ### 6. i18n & Response Messages
- Resource-specific keys allowed: message.product.created, message.bom.bulk_upsert
### 7. Swagger Documentation (l5-swagger 9.0)
- **Tags**: Resource-based (User, Auth, Product, BOM...)
- **Structure**: Swagger annotations are written in separate PHP class files under `app/Swagger/v1/`
- **File Naming**: `{Resource}Api.php` (e.g., CategoryApi.php, ClientApi.php, ProductApi.php)
- **Controller Clean**: Controllers contain ONLY business logic, NO Swagger annotations
- **Tags**: Resource-based (User, Auth, Product, BOM, Client...)
- **Security**: ApiKeyAuth + BearerAuth
- **Schemas**: Reuse ApiResponse, ErrorResponse, resource DTOs
- **Schemas**: Define in Swagger files - Resource model, Pagination, CreateRequest, UpdateRequest
- **Methods**: Define empty methods for each endpoint with full @OA annotations
- **Specifications**: Clear Path/Query/Body parameters with examples
- **No duplicate schemas**, accurate nullable/oneOf distinctions
- **Regeneration**: Run `php artisan l5-swagger:generate` after creating/updating Swagger files
**Swagger File Structure Example**:
```php
<?php
namespace App\Swagger\v1;
/**
* @OA\Tag(name="Resource", description="리소스 관리")
* @OA\Schema(schema="Resource", ...) // Model schema
* @OA\Schema(schema="ResourcePagination", ...) // Pagination schema
* @OA\Schema(schema="ResourceCreateRequest", ...) // Create request
* @OA\Schema(schema="ResourceUpdateRequest", ...) // Update request
*/
class ResourceApi {
/**
* @OA\Get(path="/api/v1/resources", tags={"Resource"}, ...)
*/
public function index() {}
/**
* @OA\Post(path="/api/v1/resources", tags={"Resource"}, ...)
*/
public function store() {}
// ... other methods
}
```
### 8. Validation (FormRequest)
- **No direct validate() calls**. Separate all into FormRequest classes