- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps) - 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep) - ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션) - 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController) - FormRequest 13개 (양식/결재선/문서 검증) - Swagger 문서 3개 (26개 엔드포인트) - i18n 메시지/에러 키 추가 - 라우트 26개 등록
32 lines
719 B
PHP
32 lines
719 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Approval;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'form_id' => 'nullable|integer|exists:approval_forms,id',
|
|
'title' => 'nullable|string|max:200',
|
|
'content' => 'nullable|array',
|
|
'attachments' => 'nullable|array',
|
|
'attachments.*' => 'integer|exists:files,id',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'form_id.exists' => __('validation.exists', ['attribute' => '결재양식']),
|
|
];
|
|
}
|
|
}
|