feat: Phase 5 API 개발 완료 (사용자 초대, 알림설정, 계정관리, 거래명세서)
5.1 사용자 초대 기능: - UserInvitation 마이그레이션, 모델, 서비스, 컨트롤러, Swagger - 초대 발송/수락/취소/재발송 API 5.2 알림설정 확장: - NotificationSetting 마이그레이션, 모델, 서비스, 컨트롤러, Swagger - 채널별/유형별 알림 설정 관리 5.3 계정정보 수정 API: - 회원탈퇴, 사용중지, 약관동의 관리 - AccountService, AccountController, Swagger 5.4 매출 거래명세서 API: - 거래명세서 조회/발행/이메일발송 - SaleService 확장, Swagger 문서화
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\NotificationSetting;
|
||||
|
||||
use App\Models\NotificationSetting;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateSettingRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'notification_type' => ['required', 'string', Rule::in(NotificationSetting::getAllTypes())],
|
||||
'push_enabled' => ['nullable', 'boolean'],
|
||||
'email_enabled' => ['nullable', 'boolean'],
|
||||
'sms_enabled' => ['nullable', 'boolean'],
|
||||
'in_app_enabled' => ['nullable', 'boolean'],
|
||||
'kakao_enabled' => ['nullable', 'boolean'],
|
||||
'settings' => ['nullable', 'array'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'notification_type.required' => __('validation.required', ['attribute' => '알림 유형']),
|
||||
'notification_type.in' => __('validation.in', ['attribute' => '알림 유형']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user