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; }