add NotificationLimiter to avoid sending too many notifications per hour
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -6,7 +6,7 @@ import SuMoC.backend.user.models.User;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Entity
|
||||
@@ -54,8 +54,10 @@ public class Notification {
|
||||
private String lastFailureReason;
|
||||
|
||||
@Column(nullable = false)
|
||||
|
||||
private LocalDateTime createdAt;
|
||||
private Instant createdAt;
|
||||
|
||||
@Column(nullable = true)
|
||||
private Instant sentAt = null;
|
||||
|
||||
public void incrementFailedSendAttempts() {
|
||||
this.failedSendAttempts++;
|
||||
|
||||
Reference in New Issue
Block a user