Skip to content

Commit

Permalink
♻️: reservedAt 컬럼 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
Leehunil committed Mar 30, 2024
1 parent 8193386 commit 42539d6
Showing 1 changed file with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import ohsoontaxi.backend.domain.user.domain.User;
import ohsoontaxi.backend.global.database.BaseEntity;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -27,8 +26,6 @@ public class Notification extends BaseEntity {

private String content;

private LocalDateTime reservedAt;

@JoinColumn(name = "reservation_id")
@ManyToOne(fetch = FetchType.LAZY)
private Reservation reservation;
Expand Down Expand Up @@ -72,25 +69,4 @@ public NotificationInfoVo getNotificationInfoVo() {
.createdDate(getCreatedDate())
.build();
}

public static Notification of(
String title,
String content,
LocalDateTime reservedAt,
Reservation reservation) {
return Notification.builder()
.title(title)
.content(content)
.reservedAt(reservedAt)
.reservation(reservation)
.build();
}

public void addReceiver(DeviceToken deviceToken) {
this.receivers.add(new NotificationReceiver(
this,
User.of(deviceToken.getUserId()),
deviceToken.getToken()));
}

}

0 comments on commit 42539d6

Please sign in to comment.