28 lines
717 B
PHP
28 lines
717 B
PHP
|
|
<?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',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|