Skip to content
Merged
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
eeaea72
add: 리뷰 v2를 위한 compose 파일 세팅
HI-JIN2 May 28, 2025
5066e6e
chore: rename "ReviewWritexxx"
HI-JIN2 May 28, 2025
d069e82
feat: 리뷰 v2 ui 구현 중
HI-JIN2 May 28, 2025
9c6f019
feat: data 연결
HI-JIN2 May 28, 2025
499ea91
chore: refactoring
HI-JIN2 May 28, 2025
3a7cdf8
feat: button 구현
HI-JIN2 May 28, 2025
1414222
chore: ratingbar 사이즈 조정
HI-JIN2 May 31, 2025
de3327c
chore: lazy column의 item 디자인 컴포넌트로 분리
HI-JIN2 May 31, 2025
4ab4ffd
chore: 디자인 시스템 변경 반영
HI-JIN2 May 31, 2025
5c2fa77
chore: add v2
HI-JIN2 Jun 1, 2025
3290846
fix: dto 및 Model 수정
HI-JIN2 Jun 1, 2025
8e32b2f
feat: 리뷰 작성 compose ui
HI-JIN2 Aug 31, 2025
6755b16
feat: 좋아요 버튼 분리
HI-JIN2 Aug 31, 2025
3327ed0
feat: 리뷰 리스트 화면 실제 api로 연결
HI-JIN2 Aug 31, 2025
77ac6fe
feat: isEmpty flag 제거
HI-JIN2 Aug 31, 2025
d459897
feat: ui모델 중 하나만 값이 들어가고, 하나는 null인 문제를 update로 해결
HI-JIN2 Aug 31, 2025
0a9d62d
refactor: Meal/menu를 뷰모델이 아닌 usecase에서 분기처리하도록 수정
HI-JIN2 Aug 31, 2025
91c5ff2
feat: 리뷰 작성하러 가기 버튼 클릭시 네비게이션
HI-JIN2 Aug 31, 2025
e96c8f7
feat: 메뉴명/Id 묶어서 네비게이션 인자로 보냄
HI-JIN2 Aug 31, 2025
126f832
feat: 메뉴명/Id 묶어서 네비게이션 인자로 보냄
HI-JIN2 Aug 31, 2025
1ef9859
feat: write에서 meal일시 메뉴리스트 조회하도록 수정
HI-JIN2 Aug 31, 2025
35c3eb4
feat: write에서 menu도 받을 수 있게 수정
HI-JIN2 Aug 31, 2025
e8834ef
feat: data 레이어에서 meal/menu 분기 처리
HI-JIN2 Aug 31, 2025
fd83ecb
feat: menu Pair<Long, String>로 변경
HI-JIN2 Aug 31, 2025
bab8e72
fix: 좋아요 버튼에 메뉴 번호 잘못들어가는 문제 수정
HI-JIN2 Aug 31, 2025
887a174
fix: 리뷰 쓰고 뒤로가기
HI-JIN2 Aug 31, 2025
f8d3a5e
fix: 갤러리
HI-JIN2 Aug 31, 2025
63d7b27
feat: 사진 포함 작성 가능
HI-JIN2 Aug 31, 2025
1e3b91f
feat: 사진이 포함된 리뷰 보여주기
HI-JIN2 Aug 31, 2025
3fb5f1d
feat: 좋아하는 메뉴 태그 반영
HI-JIN2 Aug 31, 2025
c598aee
feat: 버튼 하단 고정
HI-JIN2 Aug 31, 2025
0f4e389
fix: progress bar 미동작 수정
HI-JIN2 Aug 31, 2025
f57c944
chore: package
HI-JIN2 Aug 31, 2025
cba45c1
chore: top bar 반영
HI-JIN2 Aug 31, 2025
6c0ec83
feat: 바텀시트 연결
HI-JIN2 Aug 31, 2025
a2c745e
chore: 리베이스 실수
HI-JIN2 Sep 6, 2025
0df89bc
chore: 리베이스 실수2
HI-JIN2 Sep 6, 2025
46f48df
chore: reimport
HI-JIN2 Sep 6, 2025
8c56de2
chore: 리베이스 실수 Manifest
HI-JIN2 Sep 8, 2025
7e8a5d0
add: LikeButtonPreview
HI-JIN2 Sep 8, 2025
b9a31f4
chore: UI 디테일 반영
HI-JIN2 Sep 8, 2025
bab0806
feat: EatSsuButton에 disable 상태 추가
HI-JIN2 Sep 8, 2025
4724d2e
chore: code prettier
HI-JIN2 Sep 8, 2025
87cebff
fix: 리스트의 size로 구분
HI-JIN2 Sep 8, 2025
05f8181
refactor: 리뷰 수정/삭제/내리뷰에 대해서 flow<base<dto>>가 아닌 suspend domain을 반환하도록 수정
HI-JIN2 Sep 8, 2025
1f7aa68
refactor: bottom sheet를 재정의하도록 수정
HI-JIN2 Sep 13, 2025
3bbfb4f
feat: 내 리뷰 v2
HI-JIN2 Sep 16, 2025
8e5a0ce
feat: chip 좋아요 유무 반영
HI-JIN2 Sep 16, 2025
b1774d5
feat: 리뷰 삭제까지 연결
HI-JIN2 Sep 16, 2025
7f584df
feat: 내리뷰 삭제까지 연결
HI-JIN2 Sep 16, 2025
f440db8
feat: 삭제 후 리스트를 갱신하기 위해서 api 재호출
HI-JIN2 Sep 16, 2025
7d501af
feat: 리뷰 수정
HI-JIN2 Sep 17, 2025
c0f31c0
feat: 리뷰 수정 중
HI-JIN2 Sep 20, 2025
09dd63d
feat: 리뷰 작성할 수 있는 메뉴들 조회하는 API
HI-JIN2 Sep 20, 2025
6f9b4f5
feat: getValidMenuForReview API 수정에 따른 변경
HI-JIN2 Sep 22, 2025
1084cb6
feat: 둘러보기가 없으므로 @NoToken 제거
HI-JIN2 Sep 22, 2025
d652c9a
feat: < 뒤로가기 연결
HI-JIN2 Sep 22, 2025
3ccdfee
chore: gray100 spacer 디테일
HI-JIN2 Sep 22, 2025
6d8b846
chore: Loading일 때 메뉴명 보이게
HI-JIN2 Sep 22, 2025
9012daf
fix: 식단표 -> 리뷰 이동시에 두번 클릭되는거 막음
HI-JIN2 Sep 22, 2025
077a71d
fix: 리뷰 작성 최소조건 (별점)
HI-JIN2 Sep 22, 2025
8f6a345
chore: prettier
HI-JIN2 Sep 22, 2025
662eaf1
fix: menulist dto 변경으로 인한 수정
HI-JIN2 Sep 30, 2025
a57bc13
fix: myreview user->review로 엔드포인트 변경
HI-JIN2 Sep 30, 2025
8bb922c
fix: myreview user->review로 엔드포인트 변경2
HI-JIN2 Sep 30, 2025
37b8deb
fix: 리스트에서 받아온 name명 그대로 유지
HI-JIN2 Sep 30, 2025
71ea209
fix: 프로그래스 바 너비 고정
HI-JIN2 Sep 30, 2025
b63fd2f
fix: 프로그래스 바 굵기 수정 5dp
HI-JIN2 Sep 30, 2025
d45f47b
fix: uistate 나눔
HI-JIN2 Sep 30, 2025
a6f14ec
feat: 리뷰 수정하기 구현
HI-JIN2 Sep 30, 2025
d483227
feat: 내리뷰 -> 리뷰 수정하기 구현
HI-JIN2 Sep 30, 2025
d542e72
chore: 10.1 dto 전사 수정
HI-JIN2 Sep 30, 2025
31b3cb6
chore: import 실수
HI-JIN2 Sep 30, 2025
7e5a271
chore: 10.1 dto 전사 수정
HI-JIN2 Oct 1, 2025
bb729f1
refactor: 완료시 back 처리 고도화
HI-JIN2 Oct 1, 2025
ecbb349
delete: 이젠 안쓰는 xml 파일 삭제
HI-JIN2 Oct 1, 2025
b40a182
feat: 별점에 대한 프로그래스 바 디테일 작업
HI-JIN2 Oct 1, 2025
7278968
feat: DelayedLoadingIndicator 컴포넌트 화
HI-JIN2 Oct 1, 2025
4d69dc0
chore: core:common 모듈로 reimport
HI-JIN2 Oct 3, 2025
4b5f3f8
chore: WriteMealReviewRequest 현재 dto에 맞춰 임시 수정
HI-JIN2 Oct 3, 2025
56c61c8
chore: 신고하기로 text 수정
HI-JIN2 Oct 3, 2025
e4550bc
chore: null 여부 수정
HI-JIN2 Oct 3, 2025
512febe
chore: 더보기 버튼 수정
HI-JIN2 Oct 3, 2025
78c4a2c
chore: 프로그래스바 주석
HI-JIN2 Oct 3, 2025
50072a9
chore: 주석
HI-JIN2 Oct 3, 2025
91b1688
feat: 내리뷰에 닉네임 넣기
HI-JIN2 Oct 3, 2025
7a033e3
fix: label -> placeholder로 수정해서 floating 되지 않게 함
HI-JIN2 Oct 3, 2025
dd39050
fix: 하나라도 값이 바뀌어야 수정 버튼이 활성화
HI-JIN2 Oct 3, 2025
dd8cc0d
chore: gemini code review
HI-JIN2 Oct 3, 2025
961f894
chore: API DTO 수정 반영
HI-JIN2 Oct 16, 2025
077530f
chore: 유리님 코드리뷰
HI-JIN2 Oct 16, 2025
dee1a91
chore: change var to val
HI-JIN2 Oct 16, 2025
8297128
chore: Pair<id,name> -> MenuMini
HI-JIN2 Oct 16, 2025
ccbc209
chore: 유리님 리뷰 반영2
HI-JIN2 Oct 16, 2025
83fe0be
fix: LazyColumn key 에러
HI-JIN2 Oct 16, 2025
53d713d
fix: 사진 압축 추가
HI-JIN2 Oct 16, 2025
e521118
chore: 리뷰 삭제 이후, 같은 코루틴 안에서 suspend로 연속 실행으로 수정
HI-JIN2 Oct 16, 2025
b12e317
chore: 안쓰는 data class 제거
HI-JIN2 Nov 19, 2025
c90e8a0
Merge branch 'develop' into feat/review-v2-ui
HI-JIN2 Nov 19, 2025
566fdeb
chore: rebase 안되서 merge 방식으로 conflict 해결
HI-JIN2 Nov 19, 2025
c2d3cd8
chore: 매의 눈으로 코드 다듬기
HI-JIN2 Nov 19, 2025
673b5fd
chore: domain 계층에서 data 안쓰도록 수정
HI-JIN2 Nov 19, 2025
5379896
chore: WriteReviewData 모델 제거
HI-JIN2 Nov 19, 2025
8723837
merge develop
HI-JIN2 Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 34 additions & 22 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ android {
namespace = "com.eatssu.android"
compileSdk = 35

// S8: API 28
// S21: API 33
/**
* 현재 팀 내 안드로이드 OS 버전
* 진 S8: 9 (sdk 28)
* 진 S21: 14 (sdk 33)
* 윤소: 9
* 유리: 10
* 제훈: 14
*/

defaultConfig {
applicationId = "com.eatssu.android"
minSdk = 28
Expand Down Expand Up @@ -124,6 +131,27 @@ dependencies {
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.fragment.ktx)

// Compose
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.lifecycle.viewmodel)
implementation(libs.androidx.compose.lifecycle.runtime)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.compose.theme.adapter)
implementation(libs.accompanist.appcompat.theme)
androidTestImplementation(libs.androidx.compose.bom)
debugImplementation(libs.androidx.compose.ui.test.manifest)

// navigation
implementation(libs.androidx.navigation.fragment)
implementation(libs.androidx.navigation.ui)
implementation(libs.androidx.navigation.compose)

//glance
implementation(libs.androidx.glance)
implementation(libs.androidx.glance.preview)
Expand Down Expand Up @@ -151,6 +179,9 @@ dependencies {
implementation(libs.glide)
kapt(libs.glide.compiler)

//coil: 이미지 로딩
implementation(libs.coil.compose)

//compressor: 이미지 압축
implementation(libs.compressor)

Expand All @@ -168,6 +199,7 @@ dependencies {
kapt(libs.androidx.hilt.compiler)
implementation(libs.androidx.hilt.common)
implementation(libs.androidx.hilt.work)
implementation(libs.hilt.navigation.compose)

// ViewModel and LiveData
implementation(libs.androidx.lifecycle.viewmodel.ktx)
Expand All @@ -188,26 +220,6 @@ dependencies {
// OSS
implementation(libs.oss.licenses)

// Compose
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.ui.tooling)
implementation(libs.androidx.compose.lifecycle.viewmodel)
implementation(libs.androidx.compose.lifecycle.runtime)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.graphics)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.compose.material3)
implementation(libs.compose.theme.adapter)
implementation(libs.accompanist.appcompat.theme)
androidTestImplementation(libs.androidx.compose.bom)
debugImplementation(libs.androidx.compose.ui.test.manifest)

// navigation
implementation(libs.androidx.navigation.fragment)
implementation(libs.androidx.navigation.ui)

// worker (Kotlin + coroutines)
implementation(libs.androidx.work.runtime.ktx)

Expand Down
21 changes: 2 additions & 19 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,12 @@
</intent-filter>
</activity>
<activity
android:name=".presentation.cafeteria.review.write.ReviewWriteRateActivity"
android:name=".presentation.cafeteria.review.ReviewComposeActivity"
android:exported="true">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".presentation.cafeteria.review.write.menu.ReviewWriteMenuActivity"
android:exported="false" />
<activity
android:name=".presentation.login.LoginActivity"
android:exported="true">
Expand Down Expand Up @@ -209,14 +206,7 @@
android:value="" />
</activity>
<activity
android:name=".presentation.mypage.myreview.MyReviewListActivity"
android:exported="true">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".presentation.cafeteria.review.list.ReviewActivity"
android:name=".presentation.mypage.myreview.MyReviewListComposeActivity"
android:exported="true">
<meta-data
android:name="android.app.lib_name"
Expand All @@ -237,13 +227,6 @@
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".presentation.cafeteria.review.modify.ModifyReviewActivity"
android:exported="true">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ package com.eatssu.android.data.dto.request
import com.google.gson.annotations.SerializedName

data class ModifyReviewRequest(
@SerializedName("mainRating") var mainRating: Int? = null,
@SerializedName("amountRating") var amountRating: Int? = null,
@SerializedName("tasteRating") var tasteRating: Int? = null,
@SerializedName("content") var content: String? = null,
)
@SerializedName("rating") var rating: Int? = null,
@SerializedName("menuLikes") var menuLikes: List<MenuLikes> = arrayListOf(),
@SerializedName("content") var content: String? = null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

DTO(Data Transfer Object)의 속성은 var 대신 val로 선언하여 불변(immutable)으로 만드는 것이 좋습니다. 데이터 클래스는 일반적으로 상태를 가지지 않는 데이터 컨테이너로 사용되므로, 불변성을 유지하면 코드의 안정성과 예측 가능성을 높일 수 있습니다. 이 패턴은 다른 DTO 파일들(WriteMealReviewRequest.kt, WriteMenuReviewRequest.kt 등)에도 동일하게 적용하는 것을 권장합니다.

Suggested change
@SerializedName("rating") var rating: Int? = null,
@SerializedName("menuLikes") var menuLikes: List<MenuLikes> = arrayListOf(),
@SerializedName("content") var content: String? = null
@SerializedName("rating") val rating: Int? = null,
@SerializedName("menuLikes") val menuLikes: List<MenuLikes> = arrayListOf(),
@SerializedName("content") val content: String? = null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다른 request 확인해보니까 review 작성 관련 request만 var로 선언되어있는데 이유가 있을까요?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그리고 다른 request는 default값이 없는데 리뷰 작성 request들만 default값이 있는 이유도 궁금합니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 생각해보니까 request면 디폴트값이나 nullable을 규제하는게 맞겠네여 수정해올게요..!
제가 별 생각 없이 작업한 것 같아요🥹

) {
data class MenuLikes(

@SerializedName("menuId") var menuId: Long? = null,
@SerializedName("isLike") var isLike: Boolean? = null

)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.eatssu.android.data.dto.request

import com.google.gson.annotations.SerializedName


data class WriteMealReviewRequest(
@SerializedName("mealId") var mealId: Long,
@SerializedName("rating") var rating: Int,
@SerializedName("menuLikes") var menuLikes: List<MenuLikes>? = arrayListOf(),
@SerializedName("content") var content: String? = null,
@SerializedName("imageUrls") var imageUrls: ArrayList<String>? = arrayListOf()
) {
data class MenuLikes(
@SerializedName("menuId") var menuId: Long? = null,
@SerializedName("isLike") var isLike: Boolean? = null
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.eatssu.android.data.dto.request

import com.google.gson.annotations.SerializedName

data class WriteMenuReviewRequest(
@SerializedName("menuId") var menuId: Long? = null,
@SerializedName("mainRating") var mainRating: Int? = null,
@SerializedName("amountRating") var amountRating: Int? = null,
@SerializedName("tasteRating") var tasteRating: Int? = null,
@SerializedName("content") var content: String? = null,
@SerializedName("imageUrl") var imageUrl: String? = null,
@SerializedName("menuLike") var menuLike: MenuLike? = MenuLike()
) {
data class MenuLike(
@SerializedName("menuId") var menuId: Long? = null,
@SerializedName("isLike") var isLike: Boolean? = null
)
}

//todo api 수정되면 다시 살리기 (추석이후 api 수정 예정)
//data class WriteMenuReviewRequest(
// @SerializedName("rating") var rating: Int? = null,
// @SerializedName("menuLikes") var menuLikes: List<MenuLikes> = arrayListOf(),
// @SerializedName("content") var content: String? = null,
// @SerializedName("imageUrls") var imageUrls: List<String> = arrayListOf()
//
//) {
// data class MenuLikes(
// @SerializedName("menuId") var menuId: Long? = null,
// @SerializedName("isLike") var isLike: Boolean? = null
// )
//}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,28 @@ package com.eatssu.android.data.dto.response
import com.eatssu.android.domain.model.ReviewInfo
import com.google.gson.annotations.SerializedName

data class GetMealReviewInfoResponse(

@SerializedName("menuNames") var menuNames: ArrayList<String> = arrayListOf(),
data class MealReviewInfoResponse(
@SerializedName("menuNames") var menuNames: List<String>? = null,
@SerializedName("totalReviewCount") var totalReviewCount: Int? = null,
@SerializedName("mainRating") var mainRating: Double? = null,
@SerializedName("amountRating") var amountRating: Double? = null,
@SerializedName("tasteRating") var tasteRating: Double? = null,
@SerializedName("reviewRatingCount") var reviewRatingCount: ReviewRatingCount = ReviewRatingCount(),

) {
@SerializedName("rating") var rating: Double? = null,
@SerializedName("likeCount") var likeCount: Int? = null,
@SerializedName("reviewRatingCount") var reviewRatingCount: ReviewRatingCount? = ReviewRatingCount(),
) {
data class ReviewRatingCount(

@SerializedName("oneStarCount") var oneStarCount: Int? = null,
@SerializedName("twoStarCount") var twoStarCount: Int? = null,
@SerializedName("threeStarCount") var threeStarCount: Int? = null,
@SerializedName("fourStarCount") var fourStarCount: Int? = null,
@SerializedName("fiveStarCount") var fiveStarCount: Int? = null,

)

)
}

fun GetMealReviewInfoResponse.asReviewInfo() = ReviewInfo(

name = menuNames.joinToString(separator = "+"),
fun MealReviewInfoResponse.toDomain() = ReviewInfo(
reviewCnt = totalReviewCount ?: 0,
mainRating = mainRating ?: 0.0,
amountRating = amountRating ?: 0.0,
tasteRating = tasteRating ?: 0.0,
one = reviewRatingCount.oneStarCount ?: 0,
two = reviewRatingCount.twoStarCount ?: 0,
three = reviewRatingCount.threeStarCount ?: 0,
four = reviewRatingCount.fourStarCount ?: 0,
five = reviewRatingCount.fiveStarCount ?: 0,
rating = rating ?: 0.0,
one = reviewRatingCount?.oneStarCount ?: 0,
two = reviewRatingCount?.twoStarCount ?: 0,
three = reviewRatingCount?.threeStarCount ?: 0,
four = reviewRatingCount?.fourStarCount ?: 0,
five = reviewRatingCount?.fiveStarCount ?: 0,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package com.eatssu.android.data.dto.response

import com.eatssu.android.domain.model.Review
import com.google.gson.annotations.SerializedName

data class MealReviewListResponse(
@SerializedName("numberOfElements") var numberOfElements: Int? = null,
@SerializedName("hasNext") var hasNext: Boolean? = null,
@SerializedName("dataList") var dataList: ArrayList<DataList> = arrayListOf()
) {
data class DataList(
@SerializedName("reviewId") var reviewId: Long? = null,
@SerializedName("menuList") var menuList: ArrayList<MenuList> = arrayListOf(),
@SerializedName("writerId") var writerId: Long? = null,
@SerializedName("isWriter") var isWriter: Boolean? = null,
@SerializedName("writerNickname") var writerNickname: String? = null,
@SerializedName("rating") var rating: Int? = null,
@SerializedName("writtenAt") var writtenAt: String? = null,
@SerializedName("content") var content: String? = null,
@SerializedName("imageUrls") var imageUrls: ArrayList<String> = arrayListOf(),
) {
data class MenuList(
@SerializedName("id") var id: Long? = null,
@SerializedName("name") var name: String? = null,
@SerializedName("isLike") var isLike: Boolean? = null,
)
}
}


fun MealReviewListResponse?.toDomain(): List<Review> {
// MealReviewListResponse 객체 자체가 null이면 emptyList() 반환
return this?.dataList?.map { data ->
Review(
reviewId = data.reviewId ?: 0,
isWriter = data.isWriter ?: false,
menuList = data.menuList.map { menu ->
Review.Menu(
menuId = menu.id ?: -1L,
name = menu.name ?: "",
isLike = menu.isLike ?: false
)
},
writerNickname = data.writerNickname ?: "유저",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유저 default 보다는 다른 값처럼 빈 스트링이 좋지 않을까요??
왜 얘만 유저라고 두었는지 궁금합니다

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 그냥 딱히 이유는 없엇서여 ""로 바꾸겠슴다

rating = data.rating ?: 0,
writeDate = data.writtenAt ?: "",
content = data.content ?: "",
imgUrl = data.imageUrls.firstOrNull(),
)
} ?: emptyList()
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
package com.eatssu.android.data.dto.response

import com.eatssu.android.domain.model.MenuMini
import com.google.gson.annotations.SerializedName

data class MenuOfMealResponse(
@SerializedName("briefMenus") var briefMenus: ArrayList<MenusInformation> = arrayListOf(),
@SerializedName("menuList") var menuList: ArrayList<MenuList> = arrayListOf()
)

data class MenusInformation(
data class MenuList(

@SerializedName("menuId") var menuId: Long,
@SerializedName("name") var name: String,
@SerializedName("menuId") var menuId: Long? = null,
@SerializedName("name") var name: String? = null

)

fun MenuOfMealResponse.toMenuMiniList(): List<MenuMini> {
return briefMenus.map { it.toMenuMini() }
}
)

fun MenusInformation.toMenuMini(): MenuMini {
return MenuMini(
id = this.menuId,
name = this.name
)
fun MenuOfMealResponse.toDomain(): List<Pair<Long, String>> {
return menuList.map {
(it.menuId ?: -1L) to (it.name ?: "")
}
}
Loading