diff --git a/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleRequestDto.java b/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleRequestDto.java new file mode 100644 index 0000000..4c0c448 --- /dev/null +++ b/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleRequestDto.java @@ -0,0 +1,10 @@ +package com.hanyang.lovepin.couple.presentation.dto; + +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Getter +@NoArgsConstructor +public class CoupleRequestDto { + private Long userId; +} \ No newline at end of file diff --git a/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleRequestResponseDto.java b/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleRequestResponseDto.java new file mode 100644 index 0000000..c377327 --- /dev/null +++ b/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleRequestResponseDto.java @@ -0,0 +1,24 @@ +package com.hanyang.lovepin.couple.presentation.dto; + +import com.hanyang.lovepin.couple.domain.CoupleRequest; +import lombok.Getter; +import java.time.LocalDateTime; + +@Getter +public class CoupleRequestResponseDto { + private Long requestId; + private Long senderId; + private Long receiverId; + private String status; + private LocalDateTime createdAt; + private LocalDateTime expiresAt; + + public CoupleRequestResponseDto(CoupleRequest request) { + this.requestId = request.getRequestId(); + this.senderId = request.getSender().getUserId(); + this.receiverId = request.getReceiver().getUserId(); + this.status = request.getStatus().name(); + this.createdAt = request.getCreatedAt(); + this.expiresAt = request.getExpiresAt(); + } +} \ No newline at end of file diff --git a/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleResponseDto.java b/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleResponseDto.java new file mode 100644 index 0000000..6459fff --- /dev/null +++ b/src/main/java/com/hanyang/lovepin/couple/presentation/dto/CoupleResponseDto.java @@ -0,0 +1,25 @@ +package com.hanyang.lovepin.couple.presentation.dto; + +import com.hanyang.lovepin.couple.domain.Couple; +import lombok.Getter; +import java.time.LocalDate; +import java.time.LocalDateTime; + +@Getter +public class CoupleResponseDto { + private Long coupleId; + private Long user1Id; + private Long user2Id; + private LocalDate dDayDate; + private String status; + private LocalDateTime createdAt; + + public CoupleResponseDto(Couple couple) { + this.coupleId = couple.getCoupleId(); + this.user1Id = couple.getUser1().getUserId(); + this.user2Id = couple.getUser2().getUserId(); + this.dDayDate = couple.getDDayDate(); + this.status = couple.getStatus().name(); + this.createdAt = couple.getCreatedAt(); + } +} \ No newline at end of file