Skip to content

Commit

Permalink
자동 시간 관리 어노테이션의 제공자 수정(하이버네이트 -> 스프링)
Browse files Browse the repository at this point in the history
  • Loading branch information
One-armed-boy committed Mar 8, 2024
1 parent 15b7dae commit dbd0da1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/tiketeer/Tiketeer/domain/member/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.time.LocalDateTime;
import java.util.UUID;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UuidGenerator;
import org.springframework.data.annotation.CreatedDate;

import com.tiketeer.Tiketeer.domain.role.Role;

Expand Down Expand Up @@ -54,7 +54,7 @@ public class Member {
@Column(name = "profile_url")
private String profileUrl;

@CreationTimestamp
@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_at", nullable = false)
private LocalDateTime createdAt;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tiketeer/Tiketeer/domain/member/Otp.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import java.time.LocalDateTime;
import java.util.UUID;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UuidGenerator;
import org.springframework.data.annotation.CreatedDate;

import jakarta.persistence.Column;
import jakarta.persistence.ConstraintMode;
Expand Down Expand Up @@ -32,7 +32,7 @@ public class Otp {
@Column(name = "password", nullable = false, updatable = false)
private UUID password;

@CreationTimestamp
@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_at", nullable = false)
private LocalDateTime createdAt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.time.LocalDateTime;
import java.util.UUID;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import org.hibernate.annotations.UuidGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import com.tiketeer.Tiketeer.domain.role.constant.PermissionEnum;

Expand Down Expand Up @@ -36,12 +36,12 @@ public class Permission {
@Column(name = "name", nullable = false)
private PermissionEnum name;

@CreationTimestamp
@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_at", nullable = false)
private LocalDateTime createdAt;

@UpdateTimestamp
@LastModifiedDate
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "updated_at", nullable = false)
private LocalDateTime updatedAt;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/tiketeer/Tiketeer/domain/role/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import java.util.List;
import java.util.UUID;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import org.hibernate.annotations.UuidGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import com.tiketeer.Tiketeer.domain.role.constant.RoleEnum;

Expand Down Expand Up @@ -41,12 +41,12 @@ public class Role {
@OneToMany(mappedBy = "role")
private List<RolePermission> rolePermission;

@CreationTimestamp
@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_at", nullable = false)
private LocalDateTime createdAt;

@UpdateTimestamp
@LastModifiedDate
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "updated_at", nullable = false)
private LocalDateTime updatedAt;
Expand Down

0 comments on commit dbd0da1

Please sign in to comment.