-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/#151 알림 - 알림 엔티티 및 구조 추가 #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1e2e4fe
:sparkles: feat: 알림 도메인 구조 추가
kingmingyu cf4b35f
:sparkles: feat: 알림 관련 엔티티 추가
kingmingyu 25b55de
:recycle: refactor: 슬랙 웹훅 URL을 조직 레벨로 분리하고 디스코드 알림 설정 추가
kingmingyu b5578bf
:bug: fix: NotificationServiceImpl implements NotificationService 누락 수정
kingmingyu 29e86eb
:bug: fix: NotificationErrorCode enum 불필요한 쉼표 제거
kingmingyu e221a8b
:sparkles: feat: OrgMemberNotificationSetting에 일일 예산 50% 알림 필드 추가
kingmingyu 2f56e43
:sparkles: feat: 알림 발송 이력 추적을 위한 NotificationDelivery 엔티티 추가
kingmingyu 59ce79c
:recycle: refactor: NotificationDelivery 연관관계를 User에서 OrgMember로 변경
kingmingyu ebca70f
:bug: fix: NotificationDelivery status 필드 기본값 PENDING 추가
kingmingyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ereyouad/WhereYouAd/domains/notification/application/dto/request/NotificationRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.application.dto.request; | ||
|
|
||
| public class NotificationRequest { | ||
| } |
4 changes: 4 additions & 0 deletions
4
...eyouad/WhereYouAd/domains/notification/application/dto/response/NotificationResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.application.dto.response; | ||
|
|
||
| public class NotificationResponse { | ||
| } |
4 changes: 4 additions & 0 deletions
4
.../whereyouad/WhereYouAd/domains/notification/application/mapper/NotificationConverter.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.application.mapper; | ||
|
|
||
| public class NotificationConverter { | ||
| } |
Empty file.
9 changes: 9 additions & 0 deletions
9
.../java/com/whereyouad/WhereYouAd/domains/notification/domain/constant/DeliveryChannel.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.domain.constant; | ||
|
|
||
| public enum DeliveryChannel { | ||
| EMAIL, | ||
| SLACK, | ||
| DISCORD, | ||
| BROWSER_PUSH, | ||
| IN_APP | ||
| } |
7 changes: 7 additions & 0 deletions
7
...n/java/com/whereyouad/WhereYouAd/domains/notification/domain/constant/DeliveryStatus.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.domain.constant; | ||
|
|
||
| public enum DeliveryStatus { | ||
| PENDING, | ||
| SUCCESS, | ||
| FAILED | ||
| } |
4 changes: 4 additions & 0 deletions
4
...va/com/whereyouad/WhereYouAd/domains/notification/domain/service/NotificationService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.domain.service; | ||
|
|
||
| public interface NotificationService { | ||
| } |
9 changes: 9 additions & 0 deletions
9
...om/whereyouad/WhereYouAd/domains/notification/domain/service/NotificationServiceImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.domain.service; | ||
|
|
||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.stereotype.Service; | ||
|
|
||
| @Service | ||
| @RequiredArgsConstructor | ||
| public class NotificationServiceImpl implements NotificationService { | ||
| } |
10 changes: 10 additions & 0 deletions
10
.../java/com/whereyouad/WhereYouAd/domains/notification/exception/NotificationException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.exception; | ||
|
|
||
| import com.whereyouad.WhereYouAd.global.exception.AppException; | ||
| import com.whereyouad.WhereYouAd.global.exception.BaseErrorCode; | ||
|
|
||
| public class NotificationException extends AppException { | ||
| public NotificationException(BaseErrorCode code) { | ||
| super(code); | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
.../com/whereyouad/WhereYouAd/domains/notification/exception/code/NotificationErrorCode.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.exception.code; | ||
|
|
||
| import com.whereyouad.WhereYouAd.global.exception.BaseErrorCode; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import org.springframework.http.HttpStatus; | ||
|
|
||
| @Getter | ||
| @AllArgsConstructor | ||
| public enum NotificationErrorCode implements BaseErrorCode { | ||
|
|
||
| ; | ||
|
|
||
| private final HttpStatus httpStatus; | ||
| private final String code; | ||
| private final String message; | ||
| } |
45 changes: 45 additions & 0 deletions
45
.../java/com/whereyouad/WhereYouAd/domains/notification/persistence/entity/Notification.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.entity; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.organization.persistence.entity.Organization; | ||
| import jakarta.persistence.*; | ||
| import lombok.*; | ||
| import org.springframework.data.annotation.CreatedDate; | ||
| import org.springframework.data.jpa.domain.support.AuditingEntityListener; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| @Entity | ||
| @Table(name = "notification") | ||
| @EntityListeners(AuditingEntityListener.class) | ||
| @Getter | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class Notification { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| @Column(name = "notification_id") | ||
| private Long id; | ||
|
|
||
| @Column(name = "title", nullable = false, length = 200) | ||
| private String title; | ||
|
|
||
| @Column(name = "message", nullable = false, length = 2000) | ||
| private String message; | ||
|
|
||
| @Column(name = "link_url", length = 1024) | ||
| private String linkUrl; | ||
|
|
||
| @Column(name = "metadata_json", length = 4000) | ||
| private String metadataJson; | ||
|
|
||
| @CreatedDate | ||
| @Column(name = "created_at", updatable = false) | ||
| private LocalDateTime createdAt; | ||
|
|
||
| // 연관 관계 | ||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "org_id", nullable = false) | ||
| private Organization organization; | ||
| } |
66 changes: 66 additions & 0 deletions
66
...m/whereyouad/WhereYouAd/domains/notification/persistence/entity/NotificationDelivery.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.entity; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.domain.constant.DeliveryChannel; | ||
| import com.whereyouad.WhereYouAd.domains.notification.domain.constant.DeliveryStatus; | ||
| import com.whereyouad.WhereYouAd.domains.organization.persistence.entity.OrgMember; | ||
| import com.whereyouad.WhereYouAd.global.common.BaseEntity; | ||
| import jakarta.persistence.*; | ||
| import lombok.*; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| @Entity | ||
| @Table(name = "notification_delivery") | ||
| @Getter | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class NotificationDelivery extends BaseEntity { | ||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| @Column(name = "delivery_id") | ||
| private Long id; | ||
|
|
||
| @Enumerated(EnumType.STRING) | ||
| @Column(name = "channel", nullable = false, length = 20) | ||
| private DeliveryChannel channel; | ||
|
|
||
| @Builder.Default | ||
| @Enumerated(EnumType.STRING) | ||
| @Column(name = "status", nullable = false, length = 10) | ||
| private DeliveryStatus status = DeliveryStatus.PENDING; | ||
|
|
||
| @Column(name = "sent_at") | ||
| private LocalDateTime sentAt; | ||
|
|
||
| @Column(name = "failed_at") | ||
| private LocalDateTime failedAt; | ||
|
|
||
| @Column(name = "failure_reason", length = 500) | ||
| private String failureReason; | ||
|
|
||
| @Builder.Default | ||
| @Column(name = "retry_count", nullable = false) | ||
| private int retryCount = 0; | ||
|
|
||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "notification_id", nullable = false) | ||
| private Notification notification; | ||
|
|
||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "membership_id", nullable = false) | ||
| private OrgMember orgMember; | ||
|
|
||
| public void markSuccess() { | ||
| this.status = DeliveryStatus.SUCCESS; | ||
| this.sentAt = LocalDateTime.now(); | ||
| } | ||
|
|
||
| public void markFailed(String reason) { | ||
| this.status = DeliveryStatus.FAILED; | ||
| this.failedAt = LocalDateTime.now(); | ||
| this.failureReason = reason; | ||
| this.retryCount++; | ||
| } | ||
| } | ||
51 changes: 51 additions & 0 deletions
51
...ouad/WhereYouAd/domains/notification/persistence/entity/OrgMemberNotificationSetting.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.entity; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.organization.persistence.entity.OrgMember; | ||
| import com.whereyouad.WhereYouAd.global.common.BaseEntity; | ||
| import jakarta.persistence.*; | ||
| import lombok.*; | ||
|
|
||
| @Entity | ||
| @Table(name = "org_member_notification_setting") | ||
| @Getter | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class OrgMemberNotificationSetting extends BaseEntity { | ||
|
|
||
| @Id | ||
| @Column(name = "membership_id") | ||
| private Long membershipId; | ||
|
|
||
| @OneToOne(fetch = FetchType.LAZY) | ||
| @MapsId // PK == FK(식별 관계) | ||
| @JoinColumn(name = "membership_id") | ||
| private OrgMember orgMember; | ||
|
|
||
| @Column(name = "is_master_enabled", nullable = false) | ||
| private boolean isMasterEnabled; | ||
|
|
||
| @Column(name = "is_browser_push_enabled", nullable = false) | ||
| private boolean isBrowserPushEnabled; | ||
|
|
||
| @Column(name = "is_email_enabled", nullable = false) | ||
| private boolean isEmailEnabled; | ||
|
|
||
| @Column(name = "is_slack_enabled", nullable = false) | ||
| private boolean isSlackEnabled; | ||
|
|
||
| @Column(name = "is_discord_enabled", nullable = false) | ||
| private boolean isDiscordEnabled; | ||
|
|
||
| @Column(name = "alert_budget_50", nullable = false) | ||
| private boolean alertBudget50; | ||
|
|
||
| @Column(name = "alert_budget_80", nullable = false) | ||
| private boolean alertBudget80; | ||
|
|
||
| @Column(name = "alert_budget_100", nullable = false) | ||
| private boolean alertBudget100; | ||
|
|
||
| @Column(name = "alert_rapid_clicks", nullable = false) | ||
| private boolean alertRapidClicks; | ||
| } |
30 changes: 30 additions & 0 deletions
30
...whereyouad/WhereYouAd/domains/notification/persistence/entity/OrgNotificationSetting.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.entity; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.organization.persistence.entity.Organization; | ||
| import com.whereyouad.WhereYouAd.global.common.BaseEntity; | ||
| import jakarta.persistence.*; | ||
| import lombok.*; | ||
|
|
||
| @Entity | ||
| @Table(name = "org_notification_setting") | ||
| @Getter | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class OrgNotificationSetting extends BaseEntity { | ||
|
|
||
| @Id | ||
| @Column(name = "org_id") | ||
| private Long orgId; | ||
|
|
||
| @OneToOne(fetch = FetchType.LAZY) | ||
| @MapsId // PK == FK(식별 관계) | ||
| @JoinColumn(name = "org_id") | ||
| private Organization organization; | ||
|
|
||
| @Column(name = "slack_webhook_url", length = 512) | ||
| private String slackWebhookUrl; | ||
|
|
||
| @Column(name = "discord_webhook_url", length = 512) | ||
| private String discordWebhookUrl; | ||
| } |
38 changes: 38 additions & 0 deletions
38
...a/com/whereyouad/WhereYouAd/domains/notification/persistence/entity/UserNotification.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.entity; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.user.persistence.entity.User; | ||
| import jakarta.persistence.*; | ||
| import lombok.*; | ||
| import org.hibernate.annotations.ColumnDefault; | ||
|
|
||
| import java.time.LocalDateTime; | ||
|
|
||
| @Entity | ||
| @Table(name = "user_notification") | ||
| @Getter | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
| public class UserNotification { | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| @Id | ||
| @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| @Column(name = "user_notification_id") | ||
| private Long id; | ||
|
|
||
| @ColumnDefault("false") | ||
| @Column(name = "is_read", nullable = false) | ||
| private boolean isRead; | ||
|
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
문제 상황: UserNotification notification = UserNotification.builder()
.notification(notif)
.user(user)
.build();
// isRead는 false가 아니라 Java의 primitive boolean 기본값 false가 됨
// 하지만 Builder 패턴 사용 시 명시적으로 설정하지 않으면 의도가 불명확함해결 방법: 🛠️ 수정 제안+import lombok.Builder.Default;
+
`@ColumnDefault`("false")
`@Column`(name = "is_read", nullable = false)
+@Builder.Default
private boolean isRead = false;이렇게 하면:
🤖 Prompt for AI AgentsSource: Coding guidelines |
||
|
|
||
| @Column(name = "read_at") | ||
| private LocalDateTime readAt; | ||
|
|
||
| // 연관관계 | ||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "notification_id", nullable = false) | ||
| private Notification notification; | ||
|
|
||
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "user_id", nullable = false) | ||
| private User user; | ||
| } | ||
9 changes: 9 additions & 0 deletions
9
...hereYouAd/domains/notification/persistence/repository/NotificationDeliveryRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.repository; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.persistence.entity.NotificationDelivery; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
|
|
||
| public interface NotificationDeliveryRepository extends JpaRepository<NotificationDelivery, Long> { | ||
|
|
||
| } |
7 changes: 7 additions & 0 deletions
7
...eyouad/WhereYouAd/domains/notification/persistence/repository/NotificationRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.repository; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.persistence.entity.Notification; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface NotificationRepository extends JpaRepository<Notification, Long> { | ||
| } |
7 changes: 7 additions & 0 deletions
7
...d/domains/notification/persistence/repository/OrgMemberNotificationSettingRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.repository; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.persistence.entity.OrgMemberNotificationSetting; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface OrgMemberNotificationSettingRepository extends JpaRepository<OrgMemberNotificationSetting, Long> { | ||
| } |
7 changes: 7 additions & 0 deletions
7
...reYouAd/domains/notification/persistence/repository/OrgNotificationSettingRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.repository; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.persistence.entity.OrgNotificationSetting; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface OrgNotificationSettingRepository extends JpaRepository<OrgNotificationSetting, Long> { | ||
| } |
7 changes: 7 additions & 0 deletions
7
...ad/WhereYouAd/domains/notification/persistence/repository/UserNotificationRepository.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.persistence.repository; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.persistence.entity.UserNotification; | ||
| import org.springframework.data.jpa.repository.JpaRepository; | ||
|
|
||
| public interface UserNotificationRepository extends JpaRepository<UserNotification, Long> { | ||
| } |
12 changes: 12 additions & 0 deletions
12
...a/com/whereyouad/WhereYouAd/domains/notification/presentation/NotificationController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.presentation; | ||
|
|
||
| import com.whereyouad.WhereYouAd.domains.notification.presentation.docs.NotificationControllerDocs; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/notification") | ||
| @RequiredArgsConstructor | ||
| public class NotificationController implements NotificationControllerDocs { | ||
| } |
4 changes: 4 additions & 0 deletions
4
...reyouad/WhereYouAd/domains/notification/presentation/docs/NotificationControllerDocs.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.whereyouad.WhereYouAd.domains.notification.presentation.docs; | ||
|
|
||
| public interface NotificationControllerDocs { | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
중복 배송 레코드 방지를 위한 유니크 제약이 필요합니다.
현재 테이블 정의에는 동일 대상/채널 조합 중복을 막는 제약이 없어, 동시성 상황에서 동일 알림이 여러 건 생성될 수 있습니다. 재시도 카운트 기반 설계라면 DB 레벨 유니크 키로 보호하는 게 맞습니다.
제안 diff
membership_id로 전환한다면 해당 컬럼으로 제약 컬럼도 함께 바꿔주세요.🤖 Prompt for AI Agents