This commit is contained in:
mindol1004
2024-10-18 15:11:43 +09:00
parent 4baccedad5
commit 62e15760bf
224 changed files with 6262 additions and 20 deletions

View File

@@ -0,0 +1,38 @@
package com.spring.common.jpa;
import java.time.LocalDateTime;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import lombok.Getter;
@Getter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class AuditEntity {
@CreatedDate
@Column(name = "CREATED_DATE", updatable = false, insertable = true)
protected LocalDateTime createdDate;
@CreatedBy
@Column(name = "CREATED_BY", updatable = false, insertable = true, length = 50)
protected String createdBy;
@LastModifiedDate
@Column(name = "MODIFIED_DATE", updatable = true, insertable = true)
protected LocalDateTime modifiedDate;
@LastModifiedBy
@Column(name = "MODIFIED_BY", updatable = true, insertable = true, length = 50)
protected String modifiedBy;
}