feat: Phase 5.1-1 사용자 초대 + Phase 5.2 알림 설정 API 연동
- 사용자 초대 API: role 문자열 지원 추가 (React 호환) - 알림 설정 API: 그룹 기반 계층 구조 구현 - notification_setting_groups 테이블 추가 - notification_setting_group_items 테이블 추가 - notification_setting_group_states 테이블 추가 - GET/PUT /api/v1/settings/notifications 엔드포인트 추가 - Pint 코드 스타일 정리
This commit is contained in:
@@ -71,6 +71,75 @@
|
||||
* @OA\Items(ref="#/components/schemas/UpdateNotificationSettingRequest")
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="NotificationSettingItemSimple",
|
||||
* type="object",
|
||||
* description="개별 알림 항목 설정",
|
||||
*
|
||||
* @OA\Property(property="enabled", type="boolean", example=true, description="알림 활성화"),
|
||||
* @OA\Property(property="email", type="boolean", example=false, description="이메일 알림 활성화")
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="NotificationSettingGrouped",
|
||||
* type="object",
|
||||
* description="그룹 기반 알림 설정 (React 호환)",
|
||||
*
|
||||
* @OA\Property(
|
||||
* property="notice",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=true),
|
||||
* @OA\Property(property="notice", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="event", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="schedule",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=false),
|
||||
* @OA\Property(property="vatReport", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="incomeTaxReport", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="vendor",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=true),
|
||||
* @OA\Property(property="newVendor", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="creditRating", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="attendance",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=true),
|
||||
* @OA\Property(property="annualLeave", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="clockIn", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="late", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="absent", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="order",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=true),
|
||||
* @OA\Property(property="salesOrder", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="purchaseOrder", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="approval",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=true),
|
||||
* @OA\Property(property="approvalRequest", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="draftApproved", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="draftRejected", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="draftCompleted", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* ),
|
||||
* @OA\Property(
|
||||
* property="production",
|
||||
* type="object",
|
||||
* @OA\Property(property="enabled", type="boolean", example=true),
|
||||
* @OA\Property(property="safetyStock", ref="#/components/schemas/NotificationSettingItemSimple"),
|
||||
* @OA\Property(property="productionComplete", ref="#/components/schemas/NotificationSettingItemSimple")
|
||||
* )
|
||||
* )
|
||||
*/
|
||||
class NotificationSettingApi
|
||||
{
|
||||
@@ -170,4 +239,63 @@ public function update() {}
|
||||
* )
|
||||
*/
|
||||
public function bulkUpdate() {}
|
||||
|
||||
/**
|
||||
* @OA\Get(
|
||||
* path="/api/v1/settings/notifications",
|
||||
* operationId="getGroupedNotificationSettings",
|
||||
* tags={"NotificationSetting"},
|
||||
* summary="그룹 기반 알림 설정 조회 (React 호환)",
|
||||
* description="React 프론트엔드 구조에 맞춘 그룹 기반 알림 설정을 조회합니다.",
|
||||
* security={{"ApiKeyAuth": {}}, {"BearerAuth": {}}},
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="조회 성공"),
|
||||
* @OA\Property(property="data", ref="#/components/schemas/NotificationSettingGrouped")
|
||||
* )
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(response=401, description="인증 실패")
|
||||
* )
|
||||
*/
|
||||
public function indexGrouped() {}
|
||||
|
||||
/**
|
||||
* @OA\Put(
|
||||
* path="/api/v1/settings/notifications",
|
||||
* operationId="updateGroupedNotificationSettings",
|
||||
* tags={"NotificationSetting"},
|
||||
* summary="그룹 기반 알림 설정 업데이트 (React 호환)",
|
||||
* description="React 프론트엔드 구조에 맞춘 그룹 기반 알림 설정을 업데이트합니다.",
|
||||
* security={{"ApiKeyAuth": {}}, {"BearerAuth": {}}},
|
||||
*
|
||||
* @OA\RequestBody(
|
||||
* required=true,
|
||||
*
|
||||
* @OA\JsonContent(ref="#/components/schemas/NotificationSettingGrouped")
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="수정 성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="수정 성공"),
|
||||
* @OA\Property(property="data", ref="#/components/schemas/NotificationSettingGrouped")
|
||||
* )
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(response=401, description="인증 실패"),
|
||||
* @OA\Response(response=422, description="유효성 검증 실패")
|
||||
* )
|
||||
*/
|
||||
public function updateGrouped() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user