Skip to content

Commit

Permalink
Merge pull request #9 from PawWithU/feat/7-BaseTimeEntity
Browse files Browse the repository at this point in the history
[Feature] BaseTimeEntity 생성 및 적용
  • Loading branch information
hojeong2747 authored Oct 21, 2023
2 parents 6dd4a1c + 4354cd6 commit 81e4c6b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ConnectdogApplication {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.pawwithu.connectdog.common.entity;

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 class BaseTimeEntity {

@CreatedDate
private LocalDateTime createdDate;

@LastModifiedDate
private LocalDateTime modifiedDate;
}

0 comments on commit 81e4c6b

Please sign in to comment.