refactor to use Instant instead of LocalDateTime
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good
This commit is contained in:
@@ -4,7 +4,7 @@ import SuMoC.backend.user.enums.FriendShipStatus;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* For explanation of statuses, also see "getFriendships" in UserController.
|
||||
@@ -37,13 +37,13 @@ public class Friendship {
|
||||
private FriendShipStatus status;
|
||||
|
||||
@Column(nullable = false)
|
||||
private LocalDateTime createdAt;
|
||||
private Instant createdAt;
|
||||
|
||||
public Friendship(User user, User friend, FriendShipStatus status) {
|
||||
this.user = user;
|
||||
this.friend = friend;
|
||||
this.status = status;
|
||||
this.createdAt = LocalDateTime.now();
|
||||
this.createdAt = Instant.now();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user