Files
fiscad/src/main/java/io/gmss/fiscad/entities/BaseEntity.java

41 lines
1.1 KiB
Java
Executable File

package io.gmss.fiscad.entities;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.io.Serializable;
import java.time.Instant;
@Getter
@Setter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class BaseEntity implements Serializable {
@CreatedDate
@JsonIgnore
private Instant createdAt;
@LastModifiedDate
@JsonIgnore
private Instant updatedAt;
@CreatedBy
@JsonIgnore
private Long createdBy;
@LastModifiedBy
@JsonIgnore
private Long updatedBy;
@JsonIgnore
private boolean deleted;
private Long externalKey;
private Long enqueteExternalKey;
}