@@ -43,4 +43,12 @@ public class ViolationNotion {
|
||||
|
||||
@Column(name = "message")
|
||||
private String message;
|
||||
|
||||
@PrePersist
|
||||
public void prePersist() {
|
||||
if (this.createdAt == null) {
|
||||
this.createdAt = LocalDateTime.now();
|
||||
}
|
||||
this.updatedAt = LocalDateTime.now();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user