Files
sam-api/app/Http/Requests/V1/ProcessStep/StoreProcessStepRequest.php

44 lines
1.4 KiB
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\V1\ProcessStep;
use Illuminate\Foundation\Http\FormRequest;
class StoreProcessStepRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'step_name' => ['required', 'string', 'max:100'],
'is_required' => ['nullable', 'boolean'],
'needs_approval' => ['nullable', 'boolean'],
'needs_inspection' => ['nullable', 'boolean'],
'document_template_id' => ['nullable', 'integer', 'exists:document_templates,id'],
'is_active' => ['nullable', 'boolean'],
'connection_type' => ['nullable', 'string', 'max:20'],
'connection_target' => ['nullable', 'string', 'max:255'],
'completion_type' => ['nullable', 'string', 'max:30'],
];
}
public function attributes(): array
{
return [
'step_name' => '단계명',
'is_required' => '필수여부',
'needs_approval' => '승인필요여부',
'needs_inspection' => '검사필요여부',
'document_template_id' => '문서양식',
'is_active' => '사용여부',
'connection_type' => '연결유형',
'connection_target' => '연결대상',
'completion_type' => '완료유형',
];
}
}