package ee.tuleva.onboarding.aml;

import ee.tuleva.onboarding.user.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.time.Instant;

@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AmlCheck {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne
    private User user;

    @Enumerated(value = EnumType.STRING)
    private AmlCheckType type;

    private boolean success;

    @CreatedDate
    private Instant createdTime;

    @PrePersist
    protected void onCreate() {
        createdTime = Instant.now();
    }
}

@@ -85,102 +85,9 @@
 bok.
-AllArgsConstructor;%0Aimport lombok.Builder;%0Aimport lombok.Data;%0Aimport lombok.NoArgsConstructor
+*
 ;%0Aim
@@ -258,16 +258,46 @@
 tructor%0A
+@ToString(exclude = %7B%22user%22%7D)%0A
 public c

Exclude user from to string