-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix : Cotent dto 관련 오류 수정 * feat : 포킷 목록 조회 시 createdAt 필드 추가
- Loading branch information
1 parent
3e9af52
commit 0de1f90
Showing
8 changed files
with
41 additions
and
6 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
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
27 changes: 27 additions & 0 deletions
27
domain/src/main/kotlin/com/pokit/category/dto/CategoriesResponse.kt
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.pokit.category.dto | ||
|
||
import com.pokit.category.model.Category | ||
import com.pokit.category.model.CategoryImage | ||
import java.time.format.DateTimeFormatter | ||
|
||
data class CategoriesResponse( | ||
val categoryId: Long, | ||
val userId: Long, | ||
var categoryName: String, | ||
var categoryImage: CategoryImage, | ||
var contentCount: Int, | ||
val createdAt: String | ||
) | ||
|
||
fun Category.toCategoriesRespoonse(): CategoriesResponse { | ||
val formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd") | ||
|
||
return CategoriesResponse( | ||
categoryId = this.categoryId, | ||
userId = this.userId, | ||
categoryName = this.categoryName, | ||
categoryImage = this.categoryImage, | ||
contentCount = this.contentCount, | ||
createdAt = this.createdAt.format(formatter) | ||
) | ||
} |
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