- Price, PriceRevision 모델 추가 (PriceHistory 대체) - PricingService: CRUD, 원가 조회, 확정 기능 - PricingController: statusCode 파라미터로 201 반환 지원 - NotFoundHttpException(404) 적용 (존재하지 않는 리소스) - FormRequest 분리 (Store, Update, Index, Cost, ByItems) - Swagger 문서 업데이트 - ApiResponse::handle()에 statusCode 옵션 추가 - prices/price_revisions 마이그레이션 및 데이터 이관
25 lines
566 B
PHP
25 lines
566 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Pricing;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class PriceByItemsRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'items' => 'required|array|min:1|max:100',
|
|
'items.*.item_type_code' => 'required|string|in:PRODUCT,MATERIAL',
|
|
'items.*.item_id' => 'required|integer',
|
|
'client_group_id' => 'nullable|integer',
|
|
'date' => 'nullable|date',
|
|
];
|
|
}
|
|
}
|