feat: ClientApi.php Swagger 점검 및 개선 (Phase 3-3)
- ClientStoreRequest.php 생성 (검증 로직 분리) - ClientUpdateRequest.php 생성 (검증 로직 분리) - ClientController.php FormRequest 적용 및 패턴 통일 - lang/ko/message.php client 메시지 키 추가 - ApiResponse::handle 패턴 통일 (메시지 두 번째 인자) - SAM API Development Rules 준수 완료
This commit is contained in:
27
app/Http/Requests/Client/ClientStoreRequest.php
Normal file
27
app/Http/Requests/Client/ClientStoreRequest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Client;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ClientStoreRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'client_group_id' => 'nullable|integer',
|
||||
'client_code' => 'required|string|max:50',
|
||||
'name' => 'required|string|max:100',
|
||||
'contact_person' => 'nullable|string|max:100',
|
||||
'phone' => 'nullable|string|max:20',
|
||||
'email' => 'nullable|email|max:100',
|
||||
'address' => 'nullable|string|max:255',
|
||||
'is_active' => 'nullable|in:Y,N',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user