@@ -61,4 +61,13 @@ public class Payment {
|
||||
@JoinColumn(name = "tariff_id")
|
||||
@JsonIgnore
|
||||
private Tariff tariff;
|
||||
|
||||
|
||||
@PrePersist
|
||||
public void prePersist() {
|
||||
if (this.createdAt == null) {
|
||||
this.createdAt = LocalDateTime.now();
|
||||
}
|
||||
this.updatedAt = LocalDateTime.now();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user