diff --git a/src/main/java/umc/meme/auth/AuthApplication.java b/src/main/java/umc/meme/auth/AuthApplication.java index 66b4346..8654886 100644 --- a/src/main/java/umc/meme/auth/AuthApplication.java +++ b/src/main/java/umc/meme/auth/AuthApplication.java @@ -2,7 +2,9 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.data.jpa.repository.config.EnableJpaAuditing; +@EnableJpaAuditing @SpringBootApplication public class AuthApplication { diff --git a/src/main/java/umc/meme/auth/domain/common/BaseTimeEntity.java b/src/main/java/umc/meme/auth/domain/common/BaseTimeEntity.java deleted file mode 100644 index 5babf83..0000000 --- a/src/main/java/umc/meme/auth/domain/common/BaseTimeEntity.java +++ /dev/null @@ -1,22 +0,0 @@ -package umc.meme.auth.domain.common; - -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 BaseTimeEntity { - - @CreatedDate - private LocalDateTime createdAt; - - @LastModifiedDate - private LocalDateTime updatedAt; -} diff --git a/src/main/java/umc/meme/auth/domain/user/entity/User.java b/src/main/java/umc/meme/auth/domain/user/entity/User.java index f4ca918..1b6c2ff 100644 --- a/src/main/java/umc/meme/auth/domain/user/entity/User.java +++ b/src/main/java/umc/meme/auth/domain/user/entity/User.java @@ -8,7 +8,6 @@ import lombok.experimental.SuperBuilder; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; -import umc.meme.auth.domain.common.BaseTimeEntity; import umc.meme.auth.global.enums.Gender; import umc.meme.auth.global.enums.Provider; import umc.meme.auth.global.enums.UserStatus; @@ -21,7 +20,7 @@ @AllArgsConstructor @Inheritance(strategy = InheritanceType.JOINED) @Entity -public class User extends BaseTimeEntity { +public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "user_id")