diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesScreen.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesScreen.kt index 00f962fb..035ca47c 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesScreen.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesScreen.kt @@ -24,7 +24,7 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.hous.domain.model.Homie +import com.hous.domain.model.HomieInfo import com.hous.hous_aos.R import com.hous.hous_aos.ui.newrules.component.CategoryItem import com.hous.hous_aos.ui.newrules.component.ManagerItem @@ -143,7 +143,7 @@ fun NewRulesScreen( Spacer(modifier = Modifier.size(12.dp)) } - itemsIndexed(uiState.ManagerList) { index, value -> + itemsIndexed(uiState.managerList) { index, value -> ManagerItem( manager = value, currentIndex = index, @@ -177,7 +177,7 @@ fun NewRulesScreen( } fun isAddDay( - homies: List, + homies: List, homieState: HashMap ): Boolean { var temp = false diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt index e0acbe07..7f9b6dc7 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/NewRulesViewModel.kt @@ -3,9 +3,9 @@ package com.hous.hous_aos.ui.newrules import android.util.Log import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope -import com.hous.domain.model.Category -import com.hous.domain.model.DayData -import com.hous.domain.model.Homie +import com.hous.domain.model.CategoryInfo +import com.hous.domain.model.DayDataInfo +import com.hous.domain.model.HomieInfo import com.hous.domain.model.Manager import com.hous.domain.model.State import com.hous.domain.usecase.AddNewRuleUseCase @@ -29,8 +29,8 @@ class NewRulesViewModel @Inject constructor( val uiState = _uiState.asStateFlow() val buttonState: StateFlow = uiState.map { it.ruleName.isNotEmpty() && - it.categoryName.isNotEmpty() && - (uiState.value.checkBoxState == State.SELECT || isDayCheck()) + it.categoryName.isNotEmpty() && + (uiState.value.checkBoxState == State.SELECT || isDayCheck()) } .stateIn(viewModelScope, SharingStarted.WhileSubscribed(3000L), false) @@ -52,7 +52,7 @@ class NewRulesViewModel @Inject constructor( private fun isDayCheck(): Boolean { var isDay = true - for (manager in uiState.value.ManagerList) { + for (manager in uiState.value.managerList) { var temp = false for (dayList in manager.dayDataList) { if (dayList.dayState == State.SELECT) { @@ -105,89 +105,89 @@ class NewRulesViewModel @Inject constructor( if (isChange) { val tempManager = listOf( Manager( - uiState.value.ManagerList[0].managerHomie, + uiState.value.managerList[0].managerHomie, dayDataList = listOf( - DayData("월", State.UNSELECT), - DayData("화", State.UNSELECT), - DayData("수", State.UNSELECT), - DayData("목", State.UNSELECT), - DayData("금", State.UNSELECT), - DayData("토", State.UNSELECT), - DayData("일", State.UNSELECT) + DayDataInfo("월", State.UNSELECT), + DayDataInfo("화", State.UNSELECT), + DayDataInfo("수", State.UNSELECT), + DayDataInfo("목", State.UNSELECT), + DayDataInfo("금", State.UNSELECT), + DayDataInfo("토", State.UNSELECT), + DayDataInfo("일", State.UNSELECT) ) ) ) - _uiState.value = _uiState.value.copy(ManagerList = tempManager) + _uiState.value = _uiState.value.copy(managerList = tempManager) } else { val tempManager = listOf( Manager( - uiState.value.ManagerList[0].managerHomie, + uiState.value.managerList[0].managerHomie, dayDataList = listOf( - DayData("월", State.BLOCK), - DayData("화", State.BLOCK), - DayData("수", State.BLOCK), - DayData("목", State.BLOCK), - DayData("금", State.BLOCK), - DayData("토", State.BLOCK), - DayData("일", State.BLOCK) + DayDataInfo("월", State.BLOCK), + DayDataInfo("화", State.BLOCK), + DayDataInfo("수", State.BLOCK), + DayDataInfo("목", State.BLOCK), + DayDataInfo("금", State.BLOCK), + DayDataInfo("토", State.BLOCK), + DayDataInfo("일", State.BLOCK) ) ) ) - _uiState.value = _uiState.value.copy(ManagerList = tempManager) + _uiState.value = _uiState.value.copy(managerList = tempManager) } } fun deleteManager(index: Int) { - uiState.value.homieState[uiState.value.ManagerList[index].managerHomie.userName] = true - if (uiState.value.ManagerList.size > 1) { + uiState.value.homieState[uiState.value.managerList[index].managerHomie.userName] = true + if (uiState.value.managerList.size > 1) { val tempManager = mutableListOf() - _uiState.value.ManagerList.forEach { manager -> tempManager.add(manager) } + _uiState.value.managerList.forEach { manager -> tempManager.add(manager) } tempManager.removeAt(index) - _uiState.value = _uiState.value.copy(ManagerList = tempManager) + _uiState.value = _uiState.value.copy(managerList = tempManager) } else { - _uiState.value = _uiState.value.copy(ManagerList = listOf(Manager())) + _uiState.value = _uiState.value.copy(managerList = listOf(Manager())) setCheckBoxState("deleteManager", State.UNSELECT) } } - fun choiceManager(managerIndex: Int, homie: Homie) { - if (uiState.value.ManagerList[managerIndex].managerHomie.userName != "담당자 없음") { - _uiState.value.homieState[uiState.value.ManagerList[managerIndex].managerHomie.userName] = + fun choiceManager(managerIndex: Int, homie: HomieInfo) { + if (uiState.value.managerList[managerIndex].managerHomie.userName != "담당자 없음") { + _uiState.value.homieState[uiState.value.managerList[managerIndex].managerHomie.userName] = true } val tempManager = Manager( managerHomie = homie, - dayDataList = uiState.value.ManagerList[managerIndex].dayDataList + dayDataList = uiState.value.managerList[managerIndex].dayDataList ) val tempManagerList = mutableListOf() - _uiState.value.ManagerList.forEach { manager -> tempManagerList.add(manager) } + _uiState.value.managerList.forEach { manager -> tempManagerList.add(manager) } tempManagerList[managerIndex] = tempManager _uiState.value.homieState[homie.userName] = false - _uiState.value = _uiState.value.copy(ManagerList = tempManagerList) + _uiState.value = _uiState.value.copy(managerList = tempManagerList) } - fun selectDay(managerIndex: Int, dayData: DayData) { + fun selectDay(managerIndex: Int, dayData: DayDataInfo) { if (dayData.dayState != State.BLOCK) { val tempManager = Manager( - managerHomie = _uiState.value.ManagerList[managerIndex].managerHomie, + managerHomie = _uiState.value.managerList[managerIndex].managerHomie, dayDataList = changeDayState(dayData, managerIndex) ) val tempManagerList = mutableListOf() - uiState.value.ManagerList.forEach { manager -> tempManagerList.add(manager) } + uiState.value.managerList.forEach { manager -> tempManagerList.add(manager) } tempManagerList[managerIndex] = tempManager - _uiState.value = _uiState.value.copy(ManagerList = tempManagerList) + _uiState.value = _uiState.value.copy(managerList = tempManagerList) } } fun isShowAddButton(): Boolean = - uiState.value.ManagerList[uiState.value.ManagerList.size - 1].managerHomie.userName != "담당자 없음" + uiState.value.managerList[uiState.value.managerList.size - 1].managerHomie.userName != "담당자 없음" fun addManager() { val tempManagerList = mutableListOf() val nextManager = Manager(managerHomie = nextManager()) - uiState.value.ManagerList.forEach { manager -> tempManagerList.add(manager) } + uiState.value.managerList.forEach { manager -> tempManagerList.add(manager) } tempManagerList.add(nextManager) - _uiState.value = _uiState.value.copy(ManagerList = tempManagerList) + _uiState.value = _uiState.value.copy(managerList = tempManagerList) } fun addNewRule() { @@ -197,16 +197,16 @@ class NewRulesViewModel @Inject constructor( categoryId = uiState.value.categoryId, notificationState = uiState.value.notificationState, checkBoxState = uiState.value.checkBoxState, - managerList = uiState.value.ManagerList + managerList = uiState.value.managerList ) } } - private fun nextManager(): Homie { - var tempHomie = Homie("", "담당자 없음", typeColor = "NULL") + private fun nextManager(): HomieInfo { + var tempHomie = HomieInfo("", "담당자 없음", typeColor = "NULL") for (i in uiState.value.homies) { if (uiState.value.homieState[i.userName]!!) { - tempHomie = Homie( + tempHomie = HomieInfo( id = i.id, userName = i.userName, typeColor = i.typeColor @@ -218,23 +218,23 @@ class NewRulesViewModel @Inject constructor( return tempHomie } - private fun changeDayState(dayData: DayData, managerIndex: Int): List { - val tempDay = mutableListOf() - uiState.value.ManagerList[managerIndex].dayDataList.forEach { d -> + private fun changeDayState(dayData: DayDataInfo, managerIndex: Int): List { + val tempDay = mutableListOf() + uiState.value.managerList[managerIndex].dayDataList.forEach { d -> if (d.day == dayData.day) { when (dayData.dayState) { State.UNSELECT -> { - tempDay.add(DayData(d.day, State.SELECT)) + tempDay.add(DayDataInfo(d.day, State.SELECT)) setCheckBoxState("changeDayState Unselect", State.BLOCK) } State.SELECT -> { - tempDay.add(DayData(d.day, State.UNSELECT)) - if (uiState.value.ManagerList.size == 1) { + tempDay.add(DayDataInfo(d.day, State.UNSELECT)) + if (uiState.value.managerList.size == 1) { var isCheck = true - uiState.value.ManagerList[0].dayDataList.forEach { dayData -> + uiState.value.managerList[0].dayDataList.forEach { dayData -> if (dayData.dayState == State.SELECT) isCheck = false } - if (isCheck && uiState.value.ManagerList[0].managerHomie.userName == "담당자 없음") { + if (isCheck && uiState.value.managerList[0].managerHomie.userName == "담당자 없음") { setCheckBoxState("changeDayState select", State.UNSELECT) } } @@ -252,20 +252,20 @@ data class NewRulesUiState( val categoryId: String = "", val notificationState: Boolean = false, val checkBoxState: State = State.UNSELECT, - val ruleCategory: List = + val ruleCategory: List = listOf( - Category("1", "청소기"), - Category("2", "분리수거"), - Category("3", "세탁기"), - Category("4", "물 주기") + CategoryInfo("1", "청소기"), + CategoryInfo("2", "분리수거"), + CategoryInfo("3", "세탁기"), + CategoryInfo("4", "물 주기") ), - val homies: List = + val homies: List = listOf( - Homie("1", "강원용", typeColor = "RED"), - Homie("2", "이영주", typeColor = "BLUE"), - Homie("3", "이준원", typeColor = "YELLOW"), - Homie("4", "최인영", typeColor = "GREEN"), - Homie("5", "최소현", typeColor = "PURPLE") + HomieInfo("1", "강원용", typeColor = "RED"), + HomieInfo("2", "이영주", typeColor = "BLUE"), + HomieInfo("3", "이준원", typeColor = "YELLOW"), + HomieInfo("4", "최인영", typeColor = "GREEN"), + HomieInfo("5", "최소현", typeColor = "PURPLE") ), val homieState: HashMap = hashMapOf( "강원용" to true, @@ -274,5 +274,5 @@ data class NewRulesUiState( "최인영" to true, "최소현" to true ), - val ManagerList: List = listOf(Manager()) + val managerList: List = listOf(Manager()) ) diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryDropDown.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryDropDown.kt index b3c9ab53..5434575a 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryDropDown.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryDropDown.kt @@ -16,12 +16,12 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource +import com.hous.domain.model.CategoryInfo import com.hous.hous_aos.R -import com.hous.domain.model.Category @Composable fun CategoryDropDownMenu( - ruleCategoryList: List, + ruleCategoryList: List, setCategory: (String, String) -> Unit ) { var isExpanded by remember { mutableStateOf(false) } @@ -40,14 +40,14 @@ fun CategoryDropDownMenu( expanded = isExpanded, onDismissRequest = { isExpanded = false } ) { - ruleCategoryList.forEach { category -> + ruleCategoryList.forEach { categoryInfo -> DropdownMenuItem( onClick = { - setCategory(category.id, category.categoryName) + setCategory(categoryInfo.id, categoryInfo.categoryName) isExpanded = false } ) { - Text(category.categoryName) + Text(categoryInfo.categoryName) } } } diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryItem.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryItem.kt index 8d945f6b..b382f934 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryItem.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/CategoryItem.kt @@ -18,14 +18,14 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import com.hous.domain.model.CategoryInfo import com.hous.hous_aos.R -import com.hous.domain.model.Category @Composable fun CategoryItem( radius: Dp, categoryName: String, - ruleCategoryList: List, + ruleCategoryList: List, setCategory: (String, String) -> Unit ) { Box( diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/Day.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/Day.kt index dd9e653e..88b784ed 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/Day.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/Day.kt @@ -17,15 +17,15 @@ import androidx.compose.ui.text.font.Font import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.unit.dp -import com.hous.domain.model.DayData +import com.hous.domain.model.DayDataInfo import com.hous.domain.model.State import com.hous.hous_aos.R @Composable fun NewRulesDay( - dayData: DayData, + dayData: DayDataInfo, currentIndex: Int, - selectDay: (Int, DayData) -> Unit + selectDay: (Int, DayDataInfo) -> Unit ) { val color = when (dayData.dayState) { State.UNSELECT -> colorResource(id = R.color.white) diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/DayList.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/DayList.kt index f0c02486..278eb58a 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/DayList.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/DayList.kt @@ -5,14 +5,14 @@ import androidx.compose.foundation.lazy.LazyRow import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.runtime.Composable import androidx.compose.ui.unit.dp -import com.hous.domain.model.DayData +import com.hous.domain.model.DayDataInfo import com.hous.domain.model.Manager @Composable fun NewRulesDayList( manager: Manager, currentIndex: Int, - selectDay: (Int, DayData) -> Unit + selectDay: (Int, DayDataInfo) -> Unit ) { LazyRow(horizontalArrangement = Arrangement.spacedBy(6.dp)) { itemsIndexed(manager.dayDataList) { _, value -> diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerAddButton.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerAddButton.kt index 922e59b6..3e36808f 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerAddButton.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerAddButton.kt @@ -16,13 +16,13 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.res.colorResource import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp -import com.hous.domain.model.Homie +import com.hous.domain.model.HomieInfo import com.hous.hous_aos.R import com.hous.hous_aos.ui.newrules.isAddDay @Composable fun NewRulesAddMangerButton( - homies: List, + homies: List, homieState: HashMap, isShowAddButton: () -> Boolean, addManager: () -> Unit diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerBox.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerBox.kt index 53ac621d..ef01111e 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerBox.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerBox.kt @@ -20,7 +20,7 @@ import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import com.hous.domain.model.Homie +import com.hous.domain.model.HomieInfo import com.hous.domain.model.Manager import com.hous.domain.model.State import com.hous.hous_aos.R @@ -30,10 +30,10 @@ fun ManagerBox( radius: Dp, managerIndex: Int, manager: Manager, - homies: List, + homies: List, homieState: HashMap, checkBoxState: State, - choiceManager: (Int, Homie) -> Unit + choiceManager: (Int, HomieInfo) -> Unit ) { Box( modifier = Modifier diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerDropDown.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerDropDown.kt index ab54ecad..ca9d45c8 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerDropDown.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerDropDown.kt @@ -29,18 +29,18 @@ import androidx.compose.ui.text.font.Font import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.unit.dp -import com.hous.hous_aos.R -import com.hous.domain.model.Homie +import com.hous.domain.model.HomieInfo import com.hous.domain.model.State +import com.hous.hous_aos.R import com.hous.hous_aos.ui.newrules.isAddDay @Composable fun ManagerDropDownMenu( managerIndex: Int, - homies: List, + homies: List, homieState: HashMap, checkBoxState: State, - choiceManager: (Int, Homie) -> Unit + choiceManager: (Int, HomieInfo) -> Unit ) { if (checkBoxState != State.SELECT && isAddDay(homies, homieState)) { var isExpanded by remember { mutableStateOf(false) } @@ -61,15 +61,15 @@ fun ManagerDropDownMenu( expanded = isExpanded, onDismissRequest = { isExpanded = false } ) { - homies.forEach { homie -> - if (homieState[homie.userName]!!) { + homies.forEach { homieInfo -> + if (homieState[homieInfo.userName]!!) { DropdownMenuItem( onClick = { - choiceManager(managerIndex, homie) + choiceManager(managerIndex, homieInfo) isExpanded = false } ) { - val color = when (homie.typeColor) { + val color = when (homieInfo.typeColor) { "RED" -> colorResource(id = R.color.hous_red) "BLUE" -> colorResource(id = R.color.hous_blue) "YELLOW" -> colorResource(id = R.color.hous_yellow) @@ -89,7 +89,7 @@ fun ManagerDropDownMenu( ) Spacer(modifier = Modifier.size(6.dp)) Text( - text = homie.userName, + text = homieInfo.userName, fontFamily = FontFamily( Font( resId = R.font.spoqa_han_sans_neo_medium, diff --git a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerItem.kt b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerItem.kt index f2db6187..c0de3841 100644 --- a/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerItem.kt +++ b/app/src/main/java/com/hous/hous_aos/ui/newrules/component/ManagerItem.kt @@ -8,8 +8,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import com.hous.domain.model.DayData -import com.hous.domain.model.Homie +import com.hous.domain.model.DayDataInfo +import com.hous.domain.model.HomieInfo import com.hous.domain.model.Manager import com.hous.domain.model.State @@ -18,12 +18,12 @@ fun ManagerItem( manager: Manager, currentIndex: Int, checkBoxState: State, - homies: List, + homies: List, homieState: HashMap, setCheckBoxState: (String, State) -> Unit, deleteManager: (Int) -> Unit, - choiceManager: (Int, Homie) -> Unit, - selectDay: (Int, DayData) -> Unit + choiceManager: (Int, HomieInfo) -> Unit, + selectDay: (Int, DayDataInfo) -> Unit ) { Column { Row(verticalAlignment = Alignment.CenterVertically) { diff --git a/data/src/main/java/com/hous/data/model/response/TempManagerRequest.kt b/data/src/main/java/com/hous/data/model/request/TempManagerRequest.kt similarity index 100% rename from data/src/main/java/com/hous/data/model/response/TempManagerRequest.kt rename to data/src/main/java/com/hous/data/model/request/TempManagerRequest.kt diff --git a/domain/src/main/java/com/hous/domain/model/CategoryInfo.kt b/domain/src/main/java/com/hous/domain/model/CategoryInfo.kt new file mode 100644 index 00000000..a314c757 --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/CategoryInfo.kt @@ -0,0 +1,9 @@ +package com.hous.domain.model + +data class CategoryInfo( + val id: String = "", + val categoryName: String = "", + val categoryIcon: String = "", + val ruleName: String = "", + var isChecked: Boolean = false +) diff --git a/domain/src/main/java/com/hous/domain/model/DayDataInfo.kt b/domain/src/main/java/com/hous/domain/model/DayDataInfo.kt new file mode 100644 index 00000000..75e796bb --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/DayDataInfo.kt @@ -0,0 +1,6 @@ +package com.hous.domain.model + +data class DayDataInfo( + val day: String, + val dayState: State +) diff --git a/domain/src/main/java/com/hous/domain/model/HomieInfo.kt b/domain/src/main/java/com/hous/domain/model/HomieInfo.kt new file mode 100644 index 00000000..b6025642 --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/HomieInfo.kt @@ -0,0 +1,15 @@ +package com.hous.domain.model + +data class HomieInfo( + val id: String? = null, + val userName: String = "", + val typeName: String = "", + val typeId: String = "", + val typeColor: String = "", + val job: String = "", + val introduction: String = "", + val hashTag: List = emptyList(), + val typeScore: List = emptyList(), + var isChecked: Boolean = false, + val notificationState: Boolean = false +) diff --git a/domain/src/main/java/com/hous/domain/model/Manager.kt b/domain/src/main/java/com/hous/domain/model/Manager.kt index d4d30ba8..8cab792f 100644 --- a/domain/src/main/java/com/hous/domain/model/Manager.kt +++ b/domain/src/main/java/com/hous/domain/model/Manager.kt @@ -1,17 +1,17 @@ package com.hous.domain.model data class Manager( - val managerHomie: Homie = Homie( + val managerHomie: HomieInfo = HomieInfo( userName = "담당자 없음", typeColor = "NULL" ), - val dayDataList: List = listOf( - DayData("월", State.UNSELECT), - DayData("화", State.UNSELECT), - DayData("수", State.UNSELECT), - DayData("목", State.UNSELECT), - DayData("금", State.UNSELECT), - DayData("토", State.UNSELECT), - DayData("일", State.UNSELECT) + val dayDataList: List = listOf( + DayDataInfo("월", State.UNSELECT), + DayDataInfo("화", State.UNSELECT), + DayDataInfo("수", State.UNSELECT), + DayDataInfo("목", State.UNSELECT), + DayDataInfo("금ø", State.UNSELECT), + DayDataInfo("토", State.UNSELECT), + DayDataInfo("일", State.UNSELECT) ) ) diff --git a/domain/src/main/java/com/hous/domain/model/NewRuleInfo.kt b/domain/src/main/java/com/hous/domain/model/NewRuleInfo.kt index 7d05ae08..e18a7798 100644 --- a/domain/src/main/java/com/hous/domain/model/NewRuleInfo.kt +++ b/domain/src/main/java/com/hous/domain/model/NewRuleInfo.kt @@ -1,6 +1,6 @@ package com.hous.domain.model data class NewRuleInfo( - val ruleCategories: List = emptyList(), - val homies: List = emptyList() + val ruleCategories: List = emptyList(), + val homies: List = emptyList() ) diff --git a/domain/src/main/java/com/hous/domain/model/RuleInfo.kt b/domain/src/main/java/com/hous/domain/model/RuleInfo.kt new file mode 100644 index 00000000..ed40ee83 --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/RuleInfo.kt @@ -0,0 +1,13 @@ +package com.hous.domain.model + +data class RuleInfo( + val id: String = "", + var isChecked: Boolean = false, + val ruleName: String = "", + val todayMembersWithTypeColor: List = emptyList(), + val isTmpMember: Boolean = false, + val isAllChecked: Boolean = false, + val membersCnt: Int = 0, + val typeColors: List = emptyList(), + val categoryIcon: String = "" +) diff --git a/domain/src/main/java/com/hous/domain/model/TempManagerInfo.kt b/domain/src/main/java/com/hous/domain/model/TempManagerInfo.kt new file mode 100644 index 00000000..a23a2d9b --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/TempManagerInfo.kt @@ -0,0 +1,6 @@ +package com.hous.domain.model + +data class TempManagerInfo( + val id: String = "", + val homies: List = emptyList() +) diff --git a/domain/src/main/java/com/hous/domain/model/rules/RulesTableInfo.kt b/domain/src/main/java/com/hous/domain/model/rules/RulesTableInfo.kt new file mode 100644 index 00000000..5e73cc02 --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/rules/RulesTableInfo.kt @@ -0,0 +1,8 @@ +package com.hous.domain.model.rules + +import com.hous.domain.model.RuleInfo + +data class RulesTableInfo( + val keyRules: List, + val rules: List +) diff --git a/domain/src/main/java/com/hous/domain/model/rules/RulesTodayInfo.kt b/domain/src/main/java/com/hous/domain/model/rules/RulesTodayInfo.kt new file mode 100644 index 00000000..c2adf22e --- /dev/null +++ b/domain/src/main/java/com/hous/domain/model/rules/RulesTodayInfo.kt @@ -0,0 +1,9 @@ +package com.hous.domain.model.rules + +import com.hous.domain.model.CategoryInfo +import com.hous.domain.model.RuleInfo + +data class RulesTodayInfo( + val homeRuleCategories: List = emptyList(), + val todayTodoRules: List = emptyList() +)