27 lines
702 B
Java
27 lines
702 B
Java
package myblog.blog.base.domain;
|
|
|
|
import lombok.Getter;
|
|
import org.springframework.data.annotation.CreatedDate;
|
|
import org.springframework.data.annotation.LastModifiedDate;
|
|
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.EntityListeners;
|
|
import javax.persistence.MappedSuperclass;
|
|
import java.time.LocalDateTime;
|
|
/*
|
|
- auditing 용 추상 엔티티
|
|
*/
|
|
@EntityListeners(AuditingEntityListener.class)
|
|
@MappedSuperclass
|
|
@Getter
|
|
public abstract class BasicEntity {
|
|
|
|
@CreatedDate
|
|
@Column(updatable = false)
|
|
private LocalDateTime createdDate;
|
|
@LastModifiedDate
|
|
private LocalDateTime updatedDate;
|
|
|
|
}
|