com.infusers.core.audit.AuditRecord Maven / Gradle / Ivy
package com.infusers.core.audit;
import java.util.Date;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.PrePersist;
import jakarta.persistence.SequenceGenerator;
@Entity
public class AuditRecord {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "INFUSERS")
@SequenceGenerator(name = "INFUSERS", sequenceName = "AUDIT_SEQ", allocationSize = 1)
private Long id;
private Date createdAt;
private String userEmailId;
private int eventType;
private String eventName;
private String eventDescription;
@PrePersist
void createdAt() {
this.createdAt = new Date();
}
private AuditRecord() {
super();
this.createdAt();
}
public AuditRecord(String userEmailId, int eventType, String eventName, String eventDescription) {
super();
this.userEmailId = userEmailId;
this.eventType = eventType;
this.eventName = eventName;
this.eventDescription = eventDescription;
this.createdAt();
}
public Long getId() {
return id;
}
public String getUserEmailId() {
return userEmailId;
}
public void setUserEmailId(String userEmailId) {
this.userEmailId = userEmailId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public int getEventType() {
return eventType;
}
public void setEventType(int eventType) {
this.eventType = eventType;
}
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public String getEventDescription() {
return eventDescription;
}
public void setEventDescription(String eventDescription) {
this.eventDescription = eventDescription;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy