Skip to content

Commit 12fe3f2

Browse files
committed
CLAP-28 ✨ Feat: Notification 테이블 구조 수정
<footer> - 관련: #2
1 parent 63a077f commit 12fe3f2

File tree

4 files changed

+12
-21
lines changed

4 files changed

+12
-21
lines changed

src/main/java/clap/server/adapter/outbound/persistense/entity/notification/NotificationEntity.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import clap.server.adapter.outbound.persistense.entity.common.BaseTimeEntity;
44
import clap.server.adapter.outbound.persistense.entity.member.MemberEntity;
5-
import clap.server.adapter.outbound.persistense.entity.notification.constant.NotificationPublisherType;
5+
import clap.server.adapter.outbound.persistense.entity.notification.constant.NotificationType;
66
import clap.server.adapter.outbound.persistense.entity.task.TaskEntity;
77
import jakarta.persistence.*;
88
import lombok.AccessLevel;
@@ -27,7 +27,8 @@ public class NotificationEntity extends BaseTimeEntity {
2727
private TaskEntity task;
2828

2929
@Column(nullable = false)
30-
private String type;
30+
@Enumerated(EnumType.STRING)
31+
private NotificationType type;
3132

3233
@ManyToOne(fetch = FetchType.LAZY)
3334
@JoinColumn(name = "receiver_id", nullable = false)
@@ -36,9 +37,8 @@ public class NotificationEntity extends BaseTimeEntity {
3637
@Column(nullable = false)
3738
private String message;
3839

39-
@Column(name = "publisher_type", nullable = false)
40-
@Enumerated(EnumType.STRING)
41-
private NotificationPublisherType publisherType;
40+
@Column
41+
private String taskTitle;
4242

4343
@Column(nullable = false)
4444
private boolean isRead;

src/main/java/clap/server/adapter/outbound/persistense/entity/notification/constant/NotificationPublisherType.java

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/main/java/clap/server/adapter/outbound/persistense/entity/notification/constant/NotificationType.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
@Getter
77
@RequiredArgsConstructor
88
public enum NotificationType {
9-
SYSTEM,
10-
MEMBER
9+
COMMENT("댓글"),
10+
TASK_REQUESTED("작업 요청"),
11+
STATUS_SWITCHED("상태 전환"),
12+
PROCESSOR_ASSIGNED("처리자 할당"),
13+
PROCESSOR_CHANGED("처리자 변경");
14+
15+
private final String description;
1116
}

src/main/java/clap/server/adapter/outbound/persistense/entity/task/StatusEntity.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public class StatusEntity extends BaseTimeEntity {
2424
@JoinColumn(name = "admin_id", nullable = false)
2525
private MemberEntity admin;
2626

27-
@Column(nullable = false)
28-
private String code;
29-
3027
@Column(nullable = false)
3128
private String name;
3229

0 commit comments

Comments
 (0)