I would like to automatically persist the usual properties like createdAt/updatedAt and createdBy/updatedBy of my mongoDB base entity. With PostgreSQL I would use the @PrePersist and @PreUpdate annotations to achieve this.
How can I do this with MongoDB?
My BaseEntity:
public class BaseEntity extends ReactivePanacheMongoEntity {
// [...]
public ZonedDateTime createdAt;
public ZonedDateTime updatedAt;
public UUID createdBy;
public UUID updatedBy;
}