-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
991 additions
and
41 deletions.
There are no files selected for viewing
31 changes: 16 additions & 15 deletions
31
src/main/java/com/ajou/hertz/common/entity/BaseEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
package com.ajou.hertz.common.entity; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
import org.springframework.data.annotation.CreatedBy; | ||
import org.springframework.data.annotation.LastModifiedBy; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.MappedSuperclass; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.data.annotation.CreatedBy; | ||
import org.springframework.data.annotation.LastModifiedBy; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
@MappedSuperclass | ||
public abstract class BaseEntity extends TimeTrackedBaseEntity { | ||
|
||
@CreatedBy | ||
@Column(nullable = false, updatable = false) | ||
protected Long createdBy; | ||
@CreatedBy | ||
@Column(nullable = false, updatable = false) | ||
protected Long createdBy; | ||
|
||
@LastModifiedBy | ||
@Column(nullable = false) | ||
protected Long updatedBy; | ||
@LastModifiedBy | ||
@Column(nullable = false) | ||
protected Long updatedBy; | ||
|
||
protected BaseEntity(LocalDateTime createdAt, LocalDateTime updatedAt, Long createdBy, Long updatedBy) { | ||
super(createdAt, updatedAt); | ||
this.createdBy = createdBy; | ||
this.updatedBy = updatedBy; | ||
} | ||
protected BaseEntity(LocalDateTime createdAt, LocalDateTime updatedAt, Long createdBy, Long updatedBy) { | ||
super(createdAt, updatedAt); | ||
this.createdBy = createdBy; | ||
this.updatedBy = updatedBy; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.