Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.jobdri.jobdri_api.domain.notification.dto.response;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Schema(description = "알림 타입별 부가 데이터")
public record NotificationPayloadResponse(
@Schema(description = "비동기 작업 ID", example = "job-posting-task-123")
String taskId,

@Schema(description = "저장된 채용 공고 ID. 채용 공고 작업 성공 알림에서 제공됩니다.", example = "1")
Long jobPostingId,

@Schema(description = "모의 지원 ID. 자소서 분석 알림에서 제공됩니다.", example = "10")
Long mockApplyId,

@Schema(description = "채용 공고 저장 여부. 채용 공고 작업 성공 알림에서 제공됩니다.", example = "true")
Boolean savedToDatabase,

@Schema(description = "작업 상태. 실패 알림 또는 분석 알림에서 제공됩니다.", example = "SUCCEEDED")
String status,

@Schema(description = "실패 사유. 실패 알림에서 제공됩니다.", example = "WORKER_ERROR")
String failureReason
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,43 @@

import com.jobdri.jobdri_api.domain.notification.entity.NotificationTargetType;
import com.jobdri.jobdri_api.domain.notification.entity.NotificationType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;

import java.time.LocalDateTime;
import java.util.Map;

@Builder
@Schema(description = "알림 응답")
public record NotificationResponse(
@Schema(description = "알림 ID", example = "1")
Long id,

@Schema(description = "알림 종류", example = "JOB_POSTING_ASYNC_SUCCEEDED")
NotificationType type,

@Schema(description = "알림 제목", example = "채용 공고 작업이 완료되었습니다.")
String title,

@Schema(description = "알림 본문", example = "채용 공고 분석과 저장이 완료되었습니다.")
String body,

@Schema(description = "읽음 여부", example = "false")
boolean isRead,

@Schema(description = "읽음 처리 시각. 읽지 않은 알림이면 null입니다.", example = "2026-07-16T14:17:35.672")
LocalDateTime readAt,

@Schema(description = "알림 생성 시각", example = "2026-07-16T14:17:35.672")
LocalDateTime createdAt,

@Schema(description = "알림 클릭 시 이동 대상 종류", example = "JOB_POSTING_RESULT")
NotificationTargetType targetType,

@Schema(description = "알림 클릭 시 이동 대상 ID", example = "1")
String targetId,

@Schema(description = "알림 타입별 부가 데이터", implementation = NotificationPayloadResponse.class)
Map<String, Object> payload
) {
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
package com.jobdri.jobdri_api.domain.notification.entity;

import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "알림 이동 대상 종류")
public enum NotificationTargetType {
@Schema(description = "채용 공고 비동기 작업 상태")
JOB_POSTING_TASK,

@Schema(description = "저장된 채용 공고")
JOB_POSTING_RESULT,

@Schema(description = "자소서 분석 비동기 작업 상태")
ANALYSIS_TASK,

@Schema(description = "자소서 분석 결과")
ANALYSIS_RESULT,

@Schema(description = "이동 대상 없음")
NONE
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
package com.jobdri.jobdri_api.domain.notification.entity;

import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "알림 종류")
public enum NotificationType {
@Schema(description = "채용 공고 비동기 작업 성공")
JOB_POSTING_ASYNC_SUCCEEDED,

@Schema(description = "채용 공고 비동기 작업 실패")
JOB_POSTING_ASYNC_FAILED,

@Schema(description = "자소서 분석 비동기 작업 성공")
ANALYSIS_ASYNC_SUCCEEDED,

@Schema(description = "자소서 분석 비동기 작업 실패")
ANALYSIS_ASYNC_FAILED,

@Schema(description = "일반 알림")
GENERAL
}
Loading