package fr.ekito.example.domain; import org.joda.time.LocalDateTime; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Field; import javax.validation.constraints.NotNull; import java.util.HashMap; import java.util.Map; /** * Persist AuditEvent managed by the Spring Boot actuator * @see org.springframework.boot.actuate.audit.AuditEvent */ @Document(collection = "T_PERSISTENT_AUDIT_EVENT") public class PersistentAuditEvent { @Id @Field("event_id") private long id; @NotNull private String principal; private LocalDateTime auditEventDate; @Field("event_type") private String auditEventType; private Map<String, String> data = new HashMap<>(); public long getId() { return id; } public void setId(Long id) { this.id = id; } public String getPrincipal() { return principal; } public void setPrincipal(String principal) { this.principal = principal; } public LocalDateTime getAuditEventDate() { return auditEventDate; } public void setAuditEventDate(LocalDateTime auditEventDate) { this.auditEventDate = auditEventDate; } public String getAuditEventType() { return auditEventType; } public void setAuditEventType(String auditEventType) { this.auditEventType = auditEventType; } public Map<String, String> getData() { return data; } public void setData(Map<String, String> data) { this.data = data; } }