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:
32
app/Http/Requests/UserInvitation/AcceptInvitationRequest.php
Normal file
32
app/Http/Requests/UserInvitation/AcceptInvitationRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\UserInvitation;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AcceptInvitationRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'name' => ['required', 'string', 'max:100'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
'phone' => ['nullable', 'string', 'max:20'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'name.required' => __('validation.required', ['attribute' => '이름']),
|
||||
'password.required' => __('validation.required', ['attribute' => '비밀번호']),
|
||||
'password.min' => __('validation.min.string', ['attribute' => '비밀번호', 'min' => 8]),
|
||||
'password.confirmed' => __('validation.confirmed', ['attribute' => '비밀번호']),
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/UserInvitation/InviteUserRequest.php
Normal file
32
app/Http/Requests/UserInvitation/InviteUserRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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' => '역할']),
|
||||
];
|
||||
}
|
||||
}
|
||||
25
app/Http/Requests/UserInvitation/ListInvitationRequest.php
Normal file
25
app/Http/Requests/UserInvitation/ListInvitationRequest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\UserInvitation;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ListInvitationRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'status' => ['nullable', 'string', 'in:pending,accepted,expired,cancelled'],
|
||||
'search' => ['nullable', 'string', 'max:255'],
|
||||
'sort_by' => ['nullable', 'string', 'in:created_at,expires_at,email'],
|
||||
'sort_dir' => ['nullable', 'string', 'in:asc,desc'],
|
||||
'per_page' => ['nullable', 'integer', 'min:1', 'max:100'],
|
||||
'page' => ['nullable', 'integer', 'min:1'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user