- SendFcmRequest, PositionReorderRequest 수정 - TenantLogoUploadRequest, Salary Requests 수정 - StructureReview Requests 수정 - HandoverReport, SiteBriefing Requests 추가 Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class SendFcmRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'title' => 'required|string|max:255',
|
|
'body' => 'required|string|max:1000',
|
|
'tenant_id' => 'nullable|integer|exists:tenants,id',
|
|
'user_id' => 'nullable|integer|exists:users,id',
|
|
'platform' => 'nullable|string|in:android,ios,web',
|
|
'channel_id' => 'nullable|string|max:50',
|
|
'type' => 'nullable|string|max:50',
|
|
'url' => 'nullable|string|max:500',
|
|
'sound_key' => 'nullable|string|max:50',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'title.required' => __('validation.required', ['attribute' => '제목']),
|
|
'body.required' => __('validation.required', ['attribute' => '내용']),
|
|
'platform.in' => __('validation.in', ['attribute' => '플랫폼']),
|
|
];
|
|
}
|
|
}
|