Skip to content

Commit

Permalink
feat : BaseTimeEntity 엔티티 추가 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mingsound21 committed Jul 11, 2023
1 parent 5399e35 commit 92160b8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/com/soma/snackexercise/domain/BaseTimeEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.soma.snackexercise.domain;

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 createdAt;

@LastModifiedDate
private LocalDateTime updatedAt;
}

0 comments on commit 92160b8

Please sign in to comment.