content: package com.example.demo.model;
  
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.time.LocalDateTime;
  import javax.persistence.Column;
  import javax.persistence.EntityListeners;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.MappedSuperclass;
  import lombok.AccessLevel;
  import lombok.Getter;
  import lombok.NoArgsConstructor;
  import lombok.experimental.SuperBuilder;
  import org.springframework.data.annotation.CreatedDate;
  import org.springframework.data.annotation.LastModifiedDate;
  import org.springframework.data.jpa.domain.support.AuditingEntityListener;
  
  /**
   * Entity 기본이 되는 추상 클래스 모든 Entity 는 기본적으로 상속받아 사용받을 수 있도록 합니다. 중복되는 변수값을 공통으로 관리합니다.
   */
  @Getter
  @MappedSuperclass
  @EntityListeners(AuditingEntityListener.class)
  @NoArgsConstructor(access = AccessLevel.PROTECTED)
  @SuperBuilder
  public abstract class BaseEntity {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      @CreatedDate
      @Column(updatable = false)
      @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yy-MM-dd", timezone = "Asia/Seoul")
      private LocalDateTime createdDate;
  
      @LastModifiedDate
      @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yy-MM-dd", timezone = "Asia/Seoul")
      private LocalDateTime modifiedDate;
  }