feat: 단가 관리 API 구현 및 Flow Tester 호환성 개선
- Price, PriceRevision 모델 추가 (PriceHistory 대체) - PricingService: CRUD, 원가 조회, 확정 기능 - PricingController: statusCode 파라미터로 201 반환 지원 - NotFoundHttpException(404) 적용 (존재하지 않는 리소스) - FormRequest 분리 (Store, Update, Index, Cost, ByItems) - Swagger 문서 업데이트 - ApiResponse::handle()에 statusCode 옵션 추가 - prices/price_revisions 마이그레이션 및 데이터 이관
This commit is contained in:
27
app/Http/Requests/Pricing/PriceIndexRequest.php
Normal file
27
app/Http/Requests/Pricing/PriceIndexRequest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Pricing;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PriceIndexRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'size' => 'nullable|integer|min:1|max:100',
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'q' => 'nullable|string|max:100',
|
||||
'item_type_code' => 'nullable|string|in:PRODUCT,MATERIAL',
|
||||
'item_id' => 'nullable|integer',
|
||||
'client_group_id' => 'nullable',
|
||||
'status' => 'nullable|string|in:draft,active,inactive,finalized',
|
||||
'valid_at' => 'nullable|date',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user