@@ -41,4 +41,12 @@ public class UserVerification {
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "status")
|
||||
private ModerationStatus moderationStatus;
|
||||
|
||||
@PrePersist
|
||||
public void prePersist() {
|
||||
if (this.createdAt == null) {
|
||||
this.createdAt = LocalDateTime.now();
|
||||
}
|
||||
this.updatedAt = LocalDateTime.now();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user