5.1 사용자 초대 기능: - UserInvitation 마이그레이션, 모델, 서비스, 컨트롤러, Swagger - 초대 발송/수락/취소/재발송 API 5.2 알림설정 확장: - NotificationSetting 마이그레이션, 모델, 서비스, 컨트롤러, Swagger - 채널별/유형별 알림 설정 관리 5.3 계정정보 수정 API: - 회원탈퇴, 사용중지, 약관동의 관리 - AccountService, AccountController, Swagger 5.4 매출 거래명세서 API: - 거래명세서 조회/발행/이메일발송 - SaleService 확장, Swagger 문서화
33 lines
888 B
PHP
33 lines
888 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\UserInvitation;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class InviteUserRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'email' => ['required', 'email', 'max:255'],
|
|
'role_id' => ['nullable', 'integer', 'exists:roles,id'],
|
|
'message' => ['nullable', 'string', 'max:1000'],
|
|
'expires_days' => ['nullable', 'integer', 'min:1', 'max:30'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'email.required' => __('validation.required', ['attribute' => '이메일']),
|
|
'email.email' => __('validation.email', ['attribute' => '이메일']),
|
|
'role_id.exists' => __('validation.exists', ['attribute' => '역할']),
|
|
];
|
|
}
|
|
}
|