implemented scheduled tasks and notification scheduler so that whole chain task -> detected trends -> scheduled notification -> notification sent by worker is working
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package SuMoC.backend.trend.dto;
|
||||
|
||||
import SuMoC.backend.notification.interfaces.Notifieable;
|
||||
import SuMoC.backend.trend.enums.*;
|
||||
import SuMoC.backend.user.models.User;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -9,8 +9,8 @@ import lombok.Data;
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
public class TrendDetectionDTO {
|
||||
private User user;
|
||||
public class TrendDetectionDTO implements Notifieable {
|
||||
private Long userId;
|
||||
private TrendTimespan timespan;
|
||||
private TrendType type;
|
||||
private StatAttribute attribute;
|
||||
@@ -19,7 +19,7 @@ public class TrendDetectionDTO {
|
||||
|
||||
public static TrendDetectionDTO mockTrendDetectionDTO() {
|
||||
return TrendDetectionDTO.builder()
|
||||
.user(null) // Replace with a mock User if needed
|
||||
.userId(null) // Replace with a mock User if needed
|
||||
.timespan(TrendTimespan.WEEKLY)
|
||||
.type(TrendType.INCREASING)
|
||||
.attribute(StatAttribute.CAR_DISTANCE)
|
||||
|
||||
Reference in New Issue
Block a user