add timestamp to the score DTO
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s

This commit is contained in:
Lee 2024-07-27 20:17:57 +01:00
parent 476405acd7
commit 5cd026c025
4 changed files with 8 additions and 3 deletions

@ -101,6 +101,6 @@ public class TrackedScore {
* Gets the Tracked Score as a DTO * Gets the Tracked Score as a DTO
*/ */
public TrackedScoreDTO getAsDTO() { public TrackedScoreDTO getAsDTO() {
return new TrackedScoreDTO(scoreId, playerId, leaderboardId, pp, rank, score, missedNotes, accuracy); return new TrackedScoreDTO(scoreId, playerId, leaderboardId, pp, rank, score, missedNotes, accuracy, timestamp);
} }
} }

@ -4,6 +4,8 @@ import jakarta.persistence.Id;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import java.util.Date;
/** /**
* @author Fascinated (fascinated7) * @author Fascinated (fascinated7)
*/ */
@ -50,4 +52,9 @@ public class TrackedScoreDTO {
* The accuracy of the score. * The accuracy of the score.
*/ */
private Double accuracy; private Double accuracy;
/**
* The timestamp of the score.
*/
private Date timestamp;
} }

@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Map; import java.util.Map;

@ -1,6 +1,5 @@
package cc.fascinated.services; package cc.fascinated.services;
import cc.fascinated.model.score.TrackedScore;
import cc.fascinated.platform.Platform; import cc.fascinated.platform.Platform;
import cc.fascinated.platform.impl.ScoreSaberPlatform; import cc.fascinated.platform.impl.ScoreSaberPlatform;
import cc.fascinated.repository.couchdb.TrackedScoreRepository; import cc.fascinated.repository.couchdb.TrackedScoreRepository;