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