From 6e442a2b75299feb60e39548ffb3ec7d88c8b554 Mon Sep 17 00:00:00 2001 From: yang Date: Thu, 21 Nov 2024 05:14:16 +0900 Subject: [PATCH] =?UTF-8?q?RAC-466=20fix=20:=20=EC=8B=A0=EC=B2=AD=EC=9D=BC?= =?UTF-8?q?,=20=EB=A7=A4=EC=B9=AD=EC=9D=BC=20=EC=BB=AC=EB=9F=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80,=20=EA=B5=90=EC=88=98=EB=8B=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/dto/request/WishCreateRequest.java | 1 + .../postgraduate/domain/wish/domain/entity/Wish.java | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/main/java/com/postgraduate/domain/wish/application/dto/request/WishCreateRequest.java b/src/main/java/com/postgraduate/domain/wish/application/dto/request/WishCreateRequest.java index 2f4b5e4f..d2708f31 100644 --- a/src/main/java/com/postgraduate/domain/wish/application/dto/request/WishCreateRequest.java +++ b/src/main/java/com/postgraduate/domain/wish/application/dto/request/WishCreateRequest.java @@ -3,6 +3,7 @@ public record WishCreateRequest( String field, String postgradu, + String professor, String lab, String phoneNumber ) {} diff --git a/src/main/java/com/postgraduate/domain/wish/domain/entity/Wish.java b/src/main/java/com/postgraduate/domain/wish/domain/entity/Wish.java index 55d81437..2a4d438e 100644 --- a/src/main/java/com/postgraduate/domain/wish/domain/entity/Wish.java +++ b/src/main/java/com/postgraduate/domain/wish/domain/entity/Wish.java @@ -6,6 +6,10 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.CreationTimestamp; +import org.hibernate.annotations.UpdateTimestamp; + +import java.time.LocalDateTime; @Entity @Builder @@ -37,6 +41,13 @@ public class Wish { @Builder.Default private Status status = Status.WAITING; + @Column(nullable = false) + @CreationTimestamp + private LocalDateTime createdAt; + + @UpdateTimestamp + private LocalDateTime updatedAt; + protected void updateDone() { this.status = Status.MATCHED; }