diff --git a/src/main/java/com/activecourses/upwork/model/RefreshToken.java b/src/main/java/com/activecourses/upwork/model/RefreshToken.java index 019cf4b..05599d1 100644 --- a/src/main/java/com/activecourses/upwork/model/RefreshToken.java +++ b/src/main/java/com/activecourses/upwork/model/RefreshToken.java @@ -1,10 +1,7 @@ package com.activecourses.upwork.model; import jakarta.persistence.*; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; import java.time.Instant; @@ -26,6 +23,7 @@ public class RefreshToken { @Column(nullable = false) private Instant expiryDate; + @ToString.Exclude @OneToOne @JoinColumn(name = "user_id", unique = true) private User user; diff --git a/src/main/java/com/activecourses/upwork/model/UserProfile.java b/src/main/java/com/activecourses/upwork/model/UserProfile.java index 7b8151c..ff21370 100644 --- a/src/main/java/com/activecourses/upwork/model/UserProfile.java +++ b/src/main/java/com/activecourses/upwork/model/UserProfile.java @@ -1,10 +1,7 @@ package com.activecourses.upwork.model; import jakarta.persistence.*; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; +import lombok.*; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.math.BigDecimal; @@ -28,9 +25,9 @@ public class UserProfile { @Column(precision = 19, scale = 2) // Example precision and scale private BigDecimal hourlyRate; - private String location; + @ToString.Exclude @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "user_id", unique = true) private User user;