Skip to content

Commit

Permalink
Merge pull request #15 from DOSOPT-CDS-TABLING/feat-shop-detail-view
Browse files Browse the repository at this point in the history
[feat] 매장 상세 뷰 구현
  • Loading branch information
jihyunniiii authored Nov 28, 2023
2 parents ca73794 + 704bf46 commit 3039fa3
Show file tree
Hide file tree
Showing 52 changed files with 2,165 additions and 45 deletions.
19 changes: 13 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
android:theme="@style/Theme.TablingAndroid"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".presentation.store.PopularStoreActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".presentation.queue.QueueDetailsActivity"
android:name=".presentation.store.PopularStoreActivity"
android:exported="true"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity">
Expand All @@ -33,6 +28,18 @@
</intent-filter>
</activity>

<activity
android:name=".presentation.shopDetail.ShopDetailActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".presentation.queue.QueueDetailsActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="LockedOrientationActivity" />

<activity
android:name=".presentation.waiting.WaitingDetailActivity"
android:exported="false"
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/org/sopt/tabling/domain/model/Menu.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.sopt.tabling.domain.model

data class Menu(
val menuCategory: String,
val menuInfoList: List<MenuInfo>
)
8 changes: 8 additions & 0 deletions app/src/main/java/org/sopt/tabling/domain/model/MenuInfo.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.sopt.tabling.domain.model

data class MenuInfo(
val menuId: Long,
val menuPhotoUrl: String,
val menuName: String,
val price: Int
)
9 changes: 9 additions & 0 deletions app/src/main/java/org/sopt/tabling/domain/model/Review.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.sopt.tabling.domain.model

data class Review(
val reviewId: Long,
val star: Float,
val reviewerName: String,
val dayBefore: Int,
val reviewContent: String
)
21 changes: 21 additions & 0 deletions app/src/main/java/org/sopt/tabling/domain/model/ShopDetail.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.sopt.tabling.domain.model

data class ShopDetail(
val shopId: Long,
val detailPhotoList: List<String>,
val name: String,
val longAddress: String,
val currentWaiting: Int,
val salesTime: String,
val waitingTime: String,
val restTime: String,
val restDay: String,
val phoneNumber: String,
val hashTagList: List<String>,
val introduceContent: String,
val menuList: List<Menu>,
val averageStar: Float,
val reviewCount: Int,
val detailStarList: List<Float>,
val reviewList: List<Review>
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package org.sopt.tabling.presentation.common

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import org.sopt.tabling.data.datasource.remote.DummyDataSource
import org.sopt.tabling.data.repository.DummyRepositoryImpl
import org.sopt.tabling.presentation.dummy.DummyViewModel
import org.sopt.tabling.presentation.shopDetail.ShopDetailViewModel

class ViewModelFactory : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass.isAssignableFrom(DummyViewModel::class.java)) {
return DummyViewModel(DummyRepositoryImpl(DummyDataSource())) as T
if (modelClass.isAssignableFrom(ShopDetailViewModel::class.java)) {
return ShopDetailViewModel() as T
}
throw IllegalArgumentException("Unknown ViewModel Class")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
package org.sopt.tabling.presentation.dummy

import androidx.lifecycle.ViewModel
import org.sopt.tabling.data.repository.DummyRepositoryImpl

class DummyViewModel(
private val dummyRepositoryImpl: DummyRepositoryImpl,
) : ViewModel() {
// TODO 서버통신 관련 로직 작성
}
Loading

0 comments on commit 3039fa3

Please sign in to comment.