feat: FCM 사용자별 타겟 알림 발송 기능 추가
- today_issues 테이블에 target_user_id 컬럼 추가 (마이그레이션) - TodayIssue 모델: target_user_id 필드, targetUser 관계, forUser/targetedTo 스코프 추가 - TodayIssue 모델: 기안 상태 뱃지 상수 추가 (BADGE_DRAFT_APPROVED/REJECTED/COMPLETED) - TodayIssueObserverService: createIssueWithFcm, sendFcmNotification, getEnabledUserTokens에 targetUserId 파라미터 추가 - TodayIssueObserverService: handleApprovalStepChange - 결재자에게만 발송 - TodayIssueObserverService: handleApprovalStatusChange 추가 - 기안자에게만 발송 - ApprovalIssueObserver 신규 생성 및 AppServiceProvider에 등록 - i18n: 기안 승인/반려/완료 알림 메시지 추가 결재요청은 결재자(ApprovalStep.user_id)에게만, 기안 승인/반려는 기안자(Approval.drafter_id)에게만 FCM 발송 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -516,6 +516,11 @@
|
||||
'deposit_registered' => ':client 입금 :amount원',
|
||||
'withdrawal_registered' => ':client 출금 :amount원',
|
||||
|
||||
// 기안 상태 변경 알림
|
||||
'draft_approved' => ':title 결재가 승인되었습니다',
|
||||
'draft_rejected' => ':title 결재가 반려되었습니다',
|
||||
'draft_completed' => ':title 결재가 완료되었습니다',
|
||||
|
||||
// 하위 호환성 (deprecated)
|
||||
'order_success' => ':client 신규 수주 :amount원 확정',
|
||||
'receivable_overdue' => ':client 미수금 :amount원 연체 :days일',
|
||||
|
||||
Reference in New Issue
Block a user