Skip to content

Commit

Permalink
✨ feat: BaseEntity 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
strongmhk committed Jul 4, 2024
1 parent 17d0d88 commit bf33da4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/main/java/com/umc/dream/domain/common/BaseEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.umc.dream.domain.common;

import jakarta.persistence.Column;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import lombok.Getter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;

@Getter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class BaseEntity {

@CreatedDate
@Column(updatable = false)
private LocalDateTime createdDate;

@LastModifiedDate
private LocalDateTime lastModifiedDate;
}

0 comments on commit bf33da4

Please sign in to comment.