Skip to content

Commit f95eaba

Browse files
committed
refactor: Support 엔티티 클래스가 BaseEntity 클래스를 상속하도록 변경 (updatedAt은 answeredAt 으로 네이밍 변경)
1 parent a7e776a commit f95eaba

File tree

1 file changed

+4
-14
lines changed
  • src/main/java/com/example/log4u/domain/supports/entity

1 file changed

+4
-14
lines changed

src/main/java/com/example/log4u/domain/supports/entity/Support.java

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
package com.example.log4u.domain.supports.entity;
22

3-
import java.time.LocalDateTime;
4-
5-
import org.springframework.data.annotation.CreatedDate;
6-
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
7-
3+
import com.example.log4u.common.entity.BaseEntity;
84
import com.example.log4u.domain.supports.supportType.SupportType;
95

6+
import jakarta.persistence.AttributeOverride;
107
import jakarta.persistence.Column;
118
import jakarta.persistence.Entity;
12-
import jakarta.persistence.EntityListeners;
139
import jakarta.persistence.EnumType;
1410
import jakarta.persistence.Enumerated;
1511
import jakarta.persistence.GeneratedValue;
@@ -28,8 +24,8 @@
2824
@AllArgsConstructor(access = AccessLevel.PACKAGE)
2925

3026
@Entity
31-
@EntityListeners(AuditingEntityListener.class)
32-
public class Support {
27+
@AttributeOverride(name = "updatedAt", column = @Column(name = "ANSWERED_AT"))
28+
public class Support extends BaseEntity {
3329
@Id
3430
@GeneratedValue(strategy = GenerationType.IDENTITY)
3531
private Long id;
@@ -47,13 +43,7 @@ public class Support {
4743
@Column(nullable = false)
4844
private String content;
4945

50-
@CreatedDate
51-
private LocalDateTime createdAt;
52-
5346
@Setter
5447
@Column(nullable = true)
5548
private String answerContent;
56-
57-
@Column(nullable = true)
58-
private LocalDateTime answeredAt;
5949
}

0 commit comments

Comments
 (0)