-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from KJBig/feature/S2D-24
feat : Item 관련 of, toEntity 메소드 적용
- Loading branch information
Showing
47 changed files
with
551 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 9 additions & 8 deletions
17
src/main/java/com/sluv/server/domain/item/dto/HashtagPostResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
package com.sluv.server.domain.item.dto; | ||
|
||
import com.sluv.server.domain.item.entity.hashtag.Hashtag; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.*; | ||
|
||
@Data | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class HashtagPostResponseDto { | ||
@Schema(description = "해쉬태그 id") | ||
private Long hashtagId; | ||
@Schema(description = "해쉬태그 내용") | ||
private String hashtagContent; | ||
|
||
@Builder | ||
public HashtagPostResponseDto(Long hashtagId, String hashtagContent) { | ||
this.hashtagId = hashtagId; | ||
this.hashtagContent = hashtagContent; | ||
public static HashtagPostResponseDto of(Hashtag hashtag){ | ||
return HashtagPostResponseDto.builder() | ||
.hashtagId(hashtag.getId()) | ||
.hashtagContent(hashtag.getContent()) | ||
.build(); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
src/main/java/com/sluv/server/domain/item/dto/HashtagRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
package com.sluv.server.domain.item.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class HashtagRequestDto { | ||
@Schema(description = "새로 등록할 해쉬태그명") | ||
private String hashtagContent; | ||
|
||
@Builder | ||
public HashtagRequestDto(String hashtagContent) { | ||
this.hashtagContent = hashtagContent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
src/main/java/com/sluv/server/domain/item/dto/ItemCategoryChildResponseDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package com.sluv.server.domain.item.dto; | ||
|
||
import com.sluv.server.domain.item.entity.ItemCategory; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.*; | ||
|
||
@Data | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class ItemCategoryChildResponseDto { | ||
|
||
@Schema(description = "하위 카테고리 Id") | ||
private Long id; | ||
@Schema(description = "하위 카테고리 이름") | ||
private String name; | ||
|
||
|
||
@Builder | ||
public ItemCategoryChildResponseDto(Long id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
public static ItemCategoryChildResponseDto of(ItemCategory itemCategory){ | ||
return ItemCategoryChildResponseDto.builder() | ||
.id(itemCategory.getId()) | ||
.name(itemCategory.getName()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.