package com.pollex.pam.domain; import com.pollex.pam.aop.logging.audit.AuditLoggingType; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; import java.io.Serializable; import java.time.Instant; @EntityListeners(AuditingEntityListener.class) @Entity @Table(name = "audit_logging") public class AuditLogging implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Enumerated(EnumType.STRING) @Column(name = "functional_type") private AuditLoggingType functionalType; @Column(name = "content") private String content; @Column(name = "created_by", updatable = false) private String createdBy; @CreatedDate @Column(name = "created_date", updatable = false) private Instant createdDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public AuditLoggingType getFunctionalType() { return functionalType; } public void setFunctionalType(AuditLoggingType functionalType) { this.functionalType = functionalType; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public Instant getCreatedDate() { return createdDate; } public void setCreatedDate(Instant createdDate) { this.createdDate = createdDate; } }