File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
src/main/java/com/back/domain/wishlist/dto Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .back .domain .wishlist .dto ;
2+
3+ import com .back .domain .wishlist .enums .WishlistStatus ;
4+ import jakarta .validation .constraints .NotNull ;
5+ import lombok .AllArgsConstructor ;
6+ import lombok .Builder ;
7+ import lombok .Getter ;
8+ import lombok .NoArgsConstructor ;
9+
10+ @ Getter
11+ @ NoArgsConstructor
12+ @ AllArgsConstructor
13+ @ Builder
14+ public class WishlistRequestDto {
15+
16+ @ NotNull
17+ private Long userId ;
18+
19+ // 생성 시 기본값 ACTIVE, 필요시 상태 지정 업데이트용으로 재사용 가능
20+ private WishlistStatus status ;
21+ }
22+
Original file line number Diff line number Diff line change 1+ package com .back .domain .wishlist .dto ;
2+
3+ import com .back .domain .wishlist .entity .Wishlist ;
4+ import com .back .domain .wishlist .enums .WishlistStatus ;
5+ import lombok .AllArgsConstructor ;
6+ import lombok .Builder ;
7+ import lombok .Getter ;
8+ import lombok .NoArgsConstructor ;
9+
10+ import java .time .LocalDateTime ;
11+
12+ @ Getter
13+ @ NoArgsConstructor
14+ @ AllArgsConstructor
15+ @ Builder
16+ public class WishlistResponseDto {
17+ private Long id ;
18+ private Long userId ;
19+ private WishlistStatus status ;
20+ private LocalDateTime createdAt ;
21+
22+ public static WishlistResponseDto from (Wishlist wishlist ) {
23+ if (wishlist == null ) return null ;
24+ return WishlistResponseDto .builder ()
25+ .id (wishlist .getId ())
26+ .userId (wishlist .getUser () != null ? wishlist .getUser ().getId () : null )
27+ .status (wishlist .getStatus ())
28+ .createdAt (wishlist .getCreatedAt ())
29+ .build ();
30+ }
31+ }
32+
You can’t perform that action at this time.
0 commit comments