Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
55aeb58
feat: 친구 프로필 Service 세팅
rhkrwngud445 Aug 24, 2025
783ba62
refactor: ContactFrequency -> ContactFrequencyLevel 수정
rhkrwngud445 Aug 24, 2025
83815a3
feat: repository API 호출 로직 구성
rhkrwngud445 Aug 24, 2025
061043f
refactor: friendSummary 모델 세부 패키지 구성
rhkrwngud445 Aug 24, 2025
7492ab0
feat: friendProfileScreen 상단 상태바 패딩 적용
rhkrwngud445 Aug 24, 2025
d2cc816
chore: string res 정리
rhkrwngud445 Aug 24, 2025
4979f35
feat: dropdown 구성
rhkrwngud445 Aug 24, 2025
6d55bbb
feat: 프로필 정보 조회 API 연동
rhkrwngud445 Aug 24, 2025
3dfd47d
feat: 전화 및 문자 화면 이동 로직 구성
rhkrwngud445 Aug 24, 2025
e69e043
docs: res 사용하는 model TODO 작성
rhkrwngud445 Aug 25, 2025
7502dae
refactor: remindInterval 서버와 네이밍을 똑같이 수정
rhkrwngud445 Aug 25, 2025
f76e95c
refactor: relation 타입을 enum으로 변경
rhkrwngud445 Aug 25, 2025
19df3f3
feat: 프로필 정보 데이터 연동
rhkrwngud445 Aug 26, 2025
3d793b5
feat: 챙김 기록 데이터 연동
rhkrwngud445 Aug 26, 2025
7933609
fix: 챙김 기록 Entity 직렬화 적용
rhkrwngud445 Aug 26, 2025
7e718b6
feat: 챙김 및 친구 삭제 데이터 연동
rhkrwngud445 Aug 26, 2025
5263fb3
feat: Friend Navigation 인자 전달을 위한 Serializable 적용
rhkrwngud445 Aug 27, 2025
2c03a14
feat: 로그인 화면 UI 구현
stopstone Aug 28, 2025
bd6ac87
feat: DataStore 라이브러리 추가
stopstone Aug 28, 2025
6114ae3
feat: 카카오 SDK 연동
stopstone Aug 28, 2025
22e4d3a
feat: 로그인 화면 수정 및 네비게이션 적용
stopstone Aug 28, 2025
0d70567
feat: 카카오 소셜 로그인 서버 API 요청
stopstone Aug 28, 2025
b92b913
feat: 카카오 로그인 서버 API 연동
stopstone Aug 28, 2025
e410519
feat: 카카오 로그인 datasource 계층 분리 및 확장 가능한 코드로 변경
stopstone Aug 29, 2025
8836162
refactor: 소셜 로그인 데이터 소스 파일 경로 변경
stopstone Aug 29, 2025
78237ca
Refactor: DataStoreModule 분리
stopstone Aug 29, 2025
fb89c57
feat: 토큰 관리 및 인증 로직 구현
stopstone Aug 29, 2025
431ccc2
feat: parcelize 의존성 추가
rhkrwngud445 Aug 30, 2025
04d6d36
feat: Route 인자 전달을 위한 serializable, pacelable 적용
rhkrwngud445 Aug 30, 2025
c25a8eb
feat: friend 파라미터 전달 적용
rhkrwngud445 Aug 30, 2025
e066210
feat: 정보 수정 이벤트 적용
rhkrwngud445 Aug 30, 2025
0074695
feat: 정보 수정 API 연동
rhkrwngud445 Aug 31, 2025
85a40ee
feat: 이전 화면 데이터 적용
rhkrwngud445 Aug 31, 2025
e5fd302
fix: navigation imageUrl 인코딩 적용
rhkrwngud445 Aug 31, 2025
83465cb
feat: 화면이 길어질 경우 스크롤 적용
rhkrwngud445 Aug 31, 2025
acdd13a
feat: 수정시 다이얼로그 추가
rhkrwngud445 Aug 31, 2025
9819c4c
fix: 친구 관계 버튼 클릭 포인트 수정
rhkrwngud445 Aug 31, 2025
79b504f
fix: 챔김순서 최신순으로 수정
rhkrwngud445 Aug 31, 2025
0c08868
feat: 토큰 갱신 및 만료 처리 로직 개선
stopstone Sep 1, 2025
737b9c3
refactor: 토큰 갱신 로직 삭제
stopstone Sep 1, 2025
9f03d40
refactor: 로그인 백그라운드 색상 변경
stopstone Sep 1, 2025
123091c
refactor: string res 분리
rhkrwngud445 Sep 1, 2025
0f844a8
chore: 카카오 네이티브키 CI 설정
stopstone Sep 1, 2025
877388d
feat: 토큰 갱신 로직 추가
stopstone Sep 1, 2025
131cb47
feat: TokenManager 추가 및 토큰 관리 로직 개선
stopstone Sep 1, 2025
0800e55
refactor: 카카오 로그인 로직 수정
stopstone Sep 1, 2025
cc27edc
refactor: 토큰 유효성 검사 로직 수정
stopstone Sep 1, 2025
c3edc18
refactor: logout 로직 수정
stopstone Sep 1, 2025
75855d3
refactor: 토큰 만료 시간 계산 로직 변경
stopstone Sep 1, 2025
6ffe949
feat: 로그 유틸리티 추가
stopstone Sep 2, 2025
c6102a7
refactor: 로깅 시 호출자 정보 찾는 로직 개선
stopstone Sep 2, 2025
7bcd976
refactor: 소셜 로그인 결과 처리 방식 변경
stopstone Sep 2, 2025
2d3062d
Refactor: TokenInterceptor에서 AuthEndpoint 분리
stopstone Sep 2, 2025
9f3475a
refactor: KakaoDataSource 바인딩 DI 모듈 뷰ㅜㄴ리
stopstone Sep 2, 2025
e2fa26f
refactor: 로깅 유틸리티 `NearLog` 개선
stopstone Sep 2, 2025
f8b09cf
Merge pull request #22 from near-Contact-Reminder/feat/login-form
stopstone Sep 2, 2025
bbc5704
Merge pull request #25 from near-Contact-Reminder/feat/logger-extension
stopstone Sep 2, 2025
39d462b
fix: delete 엔드포인트 수정
rhkrwngud445 Sep 6, 2025
7e3f7b3
refactor: string res 적용
rhkrwngud445 Sep 7, 2025
a42d27a
refactor: 연락 빈도 매직넘버 처리
rhkrwngud445 Sep 7, 2025
90ed514
fix: context -> stringres 수정
rhkrwngud445 Sep 7, 2025
9bfdb65
refactor: dayOfWeek enum 적용
rhkrwngud445 Sep 7, 2025
ea1c634
fix: 네비게이션바 패딩 적용
rhkrwngud445 Sep 7, 2025
ea1bdae
fix: records isEmpty 상태를 통한 화면 상태 관리하도록 수정
rhkrwngud445 Sep 7, 2025
5b0a186
feat: 친구 프로필 Service 세팅
rhkrwngud445 Aug 24, 2025
369fd4d
refactor: ContactFrequency -> ContactFrequencyLevel 수정
rhkrwngud445 Aug 24, 2025
9a66d1a
feat: repository API 호출 로직 구성
rhkrwngud445 Aug 24, 2025
2891d1d
refactor: friendSummary 모델 세부 패키지 구성
rhkrwngud445 Aug 24, 2025
5119ed8
feat: friendProfileScreen 상단 상태바 패딩 적용
rhkrwngud445 Aug 24, 2025
77ced7c
chore: string res 정리
rhkrwngud445 Aug 24, 2025
7bfb1a8
feat: dropdown 구성
rhkrwngud445 Aug 24, 2025
4f5e7af
feat: 프로필 정보 조회 API 연동
rhkrwngud445 Aug 24, 2025
ccd2f94
refactor: conflict 수정
rhkrwngud445 Sep 7, 2025
bf10b44
docs: res 사용하는 model TODO 작성
rhkrwngud445 Aug 25, 2025
9e6673f
refactor: remindInterval 서버와 네이밍을 똑같이 수정
rhkrwngud445 Aug 25, 2025
22997cd
refactor: relation 타입을 enum으로 변경
rhkrwngud445 Aug 25, 2025
1c337d2
feat: 프로필 정보 데이터 연동
rhkrwngud445 Aug 26, 2025
46fd87f
feat: 챙김 기록 데이터 연동
rhkrwngud445 Aug 26, 2025
3367602
fix: 챙김 기록 Entity 직렬화 적용
rhkrwngud445 Aug 26, 2025
6056356
feat: 챙김 및 친구 삭제 데이터 연동
rhkrwngud445 Aug 26, 2025
d81ed8c
feat: Friend Navigation 인자 전달을 위한 Serializable 적용
rhkrwngud445 Aug 27, 2025
b802953
feat: parcelize 의존성 추가
rhkrwngud445 Aug 30, 2025
0127f09
feat: Route 인자 전달을 위한 serializable, pacelable 적용
rhkrwngud445 Aug 30, 2025
817ec40
feat: friend 파라미터 전달 적용
rhkrwngud445 Aug 30, 2025
010d395
feat: 정보 수정 이벤트 적용
rhkrwngud445 Aug 30, 2025
6eb87dd
feat: 정보 수정 API 연동
rhkrwngud445 Aug 31, 2025
77a1c65
feat: 이전 화면 데이터 적용
rhkrwngud445 Aug 31, 2025
b6dfdff
fix: navigation imageUrl 인코딩 적용
rhkrwngud445 Aug 31, 2025
5a0a84c
feat: 화면이 길어질 경우 스크롤 적용
rhkrwngud445 Aug 31, 2025
078384b
feat: 수정시 다이얼로그 추가
rhkrwngud445 Aug 31, 2025
7046065
fix: 친구 관계 버튼 클릭 포인트 수정
rhkrwngud445 Aug 31, 2025
f2807ab
fix: 챔김순서 최신순으로 수정
rhkrwngud445 Aug 31, 2025
80a0b87
refactor: string res 분리
rhkrwngud445 Sep 1, 2025
6e07d8e
fix: delete 엔드포인트 수정
rhkrwngud445 Sep 6, 2025
66c1ddd
refactor: string res 적용
rhkrwngud445 Sep 7, 2025
adfd5f4
refactor: 연락 빈도 매직넘버 처리
rhkrwngud445 Sep 7, 2025
258fa45
fix: context -> stringres 수정
rhkrwngud445 Sep 7, 2025
867511c
refactor: dayOfWeek enum 적용
rhkrwngud445 Sep 7, 2025
a77678d
fix: 네비게이션바 패딩 적용
rhkrwngud445 Sep 7, 2025
72acb6a
fix: records isEmpty 상태를 통한 화면 상태 관리하도록 수정
rhkrwngud445 Sep 7, 2025
c290de7
Merge remote-tracking branch 'origin/feat/#21-feat_친구_프로필_api_연동' int…
rhkrwngud445 Sep 7, 2025
eb93e25
feat: NearFrame 적용
rhkrwngud445 Sep 7, 2025
307da48
feat: NearDropdown 적용
rhkrwngud445 Sep 7, 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
1 change: 1 addition & 0 deletions Near/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(libs.plugins.hilt.application)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.parcelize)
}

android {
Expand Down
73 changes: 58 additions & 15 deletions Near/app/src/main/java/com/alarmy/near/data/mapper/FriendMapper.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,64 @@
package com.alarmy.near.data.mapper

import com.alarmy.near.model.Anniversary
import com.alarmy.near.model.ContactFrequency
import com.alarmy.near.model.FriendSummary
import com.alarmy.near.model.Friend
import com.alarmy.near.model.Relation
import com.alarmy.near.model.ReminderInterval
import com.alarmy.near.network.request.AnniversaryRequest
import com.alarmy.near.network.request.ContactFrequencyRequest
import com.alarmy.near.network.request.FriendRequest
import com.alarmy.near.network.response.AnniversaryEntity
import com.alarmy.near.network.response.ContactFrequencyEntity
import com.alarmy.near.network.response.FriendEntity

fun FriendEntity.toModel(): FriendSummary =
FriendSummary(
id = friendId,
fun FriendEntity.toModel(): Friend =
Friend(
friendId = friendId,
imageUrl = imageUrl,
relation = Relation.valueOf(relation),
name = name,
profileImageUrl = imageUrl,
lastContactedAt = lastContactAt,
isContacted = true,
contactFrequency =
when (checkRate) {
in 0..29 -> ContactFrequency.LOW
in 30..69 -> ContactFrequency.MIDDLE
in 70..100 -> ContactFrequency.HIGH
else -> ContactFrequency.LOW
},
)
contactFrequency = contactFrequency.toModel(),
birthday = birthday,
anniversaryList = anniversaryList.map { it.toModel() },
memo = memo,
phone = phone,
lastContactAt = lastContactAt,
)

fun ContactFrequencyEntity.toModel(): ContactFrequency =
ContactFrequency(
reminderInterval = ReminderInterval.valueOf(contactWeek),
Comment on lines +20 to +32

Choose a reason for hiding this comment

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

high

Relation.valueOf(relation)이나 ReminderInterval.valueOf(contactWeek)는 서버에서 예상치 못한 값을 보내줄 경우 IllegalArgumentException을 발생시켜 앱이 비정상 종료될 수 있습니다. 보다 안전한 처리를 위해 try-catch 블록을 사용하거나, entries.find와 기본값을 사용하는 것을 권장합니다.

dayOfWeek = dayOfWeek,
)

fun AnniversaryEntity.toModel(): Anniversary =
Anniversary(
id = id,
title = title,
date = date,
)

fun Friend.toRequest(): FriendRequest =
FriendRequest(
name = name,
relation = relation.toString(),
contactFrequency = contactFrequency.toRequest(),
birthday = birthday,
anniversaryList = anniversaryList.map { it.toRequest() },
memo = memo,
phone = phone,
)

fun ContactFrequency.toRequest(): ContactFrequencyRequest =
ContactFrequencyRequest(
contactWeek = reminderInterval.toString(),
dayOfWeek = dayOfWeek,
)

fun Anniversary.toRequest(): AnniversaryRequest =
AnniversaryRequest(
id = id,
title = title,
date = date,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.alarmy.near.data.mapper

import com.alarmy.near.model.FriendRecord
import com.alarmy.near.network.response.FriendRecordEntity
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

fun FriendRecordEntity.toModel(): FriendRecord =
FriendRecord(
isChecked = isChecked,
createdAt = createdAt.toShortDate(),
)

private fun String.toShortDate(): String {
val inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
val outputFormatter = DateTimeFormatter.ofPattern("yy.MM.dd")

val dateTime = LocalDateTime.parse(this, inputFormatter)
return dateTime.format(outputFormatter)
}
Comment on lines +14 to +20

Choose a reason for hiding this comment

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

high

toShortDate 함수에서 LocalDateTime.parse는 서버에서 예상치 못한 형식의 날짜 문자열을 받을 경우 DateTimeParseException을 발생시켜 앱이 비정상 종료될 수 있습니다. try-catch로 예외 처리를 추가하는 것이 좋습니다.

또한, DateTimeFormatter는 스레드에 안전하므로 파일의 최상위 수준에 상수로 선언하여 매번 객체를 생성하는 비용을 줄일 수 있습니다.

Suggested change
private fun String.toShortDate(): String {
val inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
val outputFormatter = DateTimeFormatter.ofPattern("yy.MM.dd")
val dateTime = LocalDateTime.parse(this, inputFormatter)
return dateTime.format(outputFormatter)
}
private fun String.toShortDate(): String {
val inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
val outputFormatter = DateTimeFormatter.ofPattern("yy.MM.dd")
return try {
val dateTime = LocalDateTime.parse(this, inputFormatter)
dateTime.format(outputFormatter)
} catch (e: java.time.format.DateTimeParseException) {
this // Or return a placeholder
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.alarmy.near.data.mapper

import com.alarmy.near.model.friendsummary.ContactFrequencyLevel
import com.alarmy.near.model.friendsummary.FriendSummary
import com.alarmy.near.network.response.FriendSummaryEntity

fun FriendSummaryEntity.toModel(): FriendSummary =
FriendSummary(
id = friendId,
name = name,
profileImageUrl = imageUrl,
lastContactedAt = lastContactAt,
isContacted = true,
contactFrequencyLevel =
when (checkRate) {
in 0..29 -> ContactFrequencyLevel.LOW
in 30..69 -> ContactFrequencyLevel.MIDDLE
in 70..100 -> ContactFrequencyLevel.HIGH
else -> ContactFrequencyLevel.LOW
},
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.alarmy.near.data.repository

import com.alarmy.near.data.mapper.toModel
import com.alarmy.near.model.FriendSummary
import com.alarmy.near.data.mapper.toRequest
import com.alarmy.near.model.Friend
import com.alarmy.near.model.FriendRecord
import com.alarmy.near.model.friendsummary.FriendSummary
import com.alarmy.near.model.monthly.MonthlyFriend
import com.alarmy.near.network.service.FriendService
import kotlinx.coroutines.flow.Flow
Expand Down Expand Up @@ -30,4 +33,34 @@ class DefaultFriendRepository
},
)
}

override fun fetchFriendById(friendId: String): Flow<Friend> =
flow {
emit(friendService.fetchFriendById(friendId).toModel())
}

override fun updateFriend(
friendId: String,
friend: Friend,
): Flow<Friend> =
flow {
emit(friendService.updateFriend(friendId, friend.toRequest()).toModel())
}

override fun deleteFriend(friendId: String): Flow<Unit> =
flow {
friendService.deleteFriend(friendId)
emit(Unit)
}

override fun fetchFriendRecord(friendId: String): Flow<List<FriendRecord>> =
flow {
emit(friendService.fetchFriendRecord(friendId).map { it.toModel() })
}

override fun recordContact(friendId: String): Flow<String> =
flow {
val response = friendService.recordContact(friendId)
emit(response.message) // CommonMessageEntity.message 라고 가정
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
package com.alarmy.near.data.repository

import com.alarmy.near.model.FriendSummary
import com.alarmy.near.model.Friend
import com.alarmy.near.model.FriendRecord
import com.alarmy.near.model.friendsummary.FriendSummary
import com.alarmy.near.model.monthly.MonthlyFriend
import kotlinx.coroutines.flow.Flow

interface FriendRepository {
fun fetchFriends(): Flow<List<FriendSummary>>

fun fetchMonthlyFriends(): Flow<List<MonthlyFriend>>

fun fetchFriendById(friendId: String): Flow<Friend>

fun updateFriend(
friendId: String,
friend: Friend,
): Flow<Friend>

fun deleteFriend(friendId: String): Flow<Unit>

fun fetchFriendRecord(friendId: String): Flow<List<FriendRecord>>

fun recordContact(friendId: String): Flow<String>
}

This file was deleted.

48 changes: 48 additions & 0 deletions Near/app/src/main/java/com/alarmy/near/model/Friend.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.alarmy.near.model

import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import kotlinx.serialization.Serializable
import java.time.LocalDate
import java.time.format.DateTimeFormatter
import java.util.Locale

@Parcelize
@Serializable
data class Friend(
val friendId: String,
val imageUrl: String?,
val relation: Relation,
val name: String,
val contactFrequency: ContactFrequency,
val birthday: String?,
val anniversaryList: List<Anniversary>,
val memo: String?,
val phone: String?,
val lastContactAt: String?, // "2025-07-16"
) : Parcelable {
val isContactedToday: Boolean
get() = lastContactAt?.isToday() ?: false

private fun String.isToday(): Boolean {
Copy link
Contributor

Choose a reason for hiding this comment

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

확장함수로 구현하니 사용하기 훨씬 간결하고 편리해진 것 같아요!!
현재는 private로 구현이 되어 있는데 이유가 있을까용?!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

다른 곳에 사용 되는 것이 안보여서, 우선 내부적으로 처리했습니다! 사실 개인적으로 확장함수를 외부에서 쉽게 사용하는 것을 선호하진 않아요!
프레임워크에서 제공하는 함수인지 내부적으로 만든 함수인지 구분이 어려운 문제가 있기 때문입니다😂

Copy link
Contributor

Choose a reason for hiding this comment

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

오 그렇군요! 저는 외부에서 쉽게 활용되는 것은 선호하였습니다..!
직접 작성한 것인지 프레임워크가 제공하는 것인지 모르는 것이.. 확장함수의 매력이라고 생각하여 코틀린의 특징이라고 생각했어요!

주형님 의견을 들어보니 막 남발하는 것도 좋지 않아 보이네요! 의견 감사드려요!

val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.KOREA)
val targetDate = LocalDate.parse(this, formatter)
val today = LocalDate.now()
return targetDate == today
}
Comment on lines +29 to +34

Choose a reason for hiding this comment

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

high

isToday 함수에서 LocalDate.parselastContactAt의 형식이 "yyyy-MM-dd"가 아닐 경우 DateTimeParseException을 발생시켜 앱이 비정상 종료될 수 있습니다. try-catch로 예외 처리를 추가하는 것이 좋습니다.

또한, DateTimeFormatter는 스레드에 안전하므로 최상위 상수로 선언하여 매번 객체를 생성하는 비용을 줄일 수 있습니다.

    private fun String.isToday(): Boolean {
        val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd", Locale.KOREA)
        return try {
            val targetDate = LocalDate.parse(this, formatter)
            val today = LocalDate.now()
            targetDate == today
        } catch (e: java.time.format.DateTimeParseException) {
            false
        }
    }

}

@Serializable
@Parcelize
data class ContactFrequency(
val reminderInterval: ReminderInterval,
val dayOfWeek: String,
) : Parcelable

@Serializable
@Parcelize
data class Anniversary(
val id: Int? = null,
val title: String,
val date: String? = null,
) : Parcelable
6 changes: 6 additions & 0 deletions Near/app/src/main/java/com/alarmy/near/model/FriendRecord.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.alarmy.near.model

data class FriendRecord(
val isChecked: Boolean,
val createdAt: String, // ex) 25.11.12
)
13 changes: 9 additions & 4 deletions Near/app/src/main/java/com/alarmy/near/model/Relation.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package com.alarmy.near.model

enum class Relation {
FRIEND,
FAMILY,
ACQUAINTANCE,
import androidx.annotation.StringRes
import com.alarmy.near.R

enum class Relation(
@param:StringRes val resId: Int,
) {
FRIEND(R.string.relation_friend),
FAMILY(R.string.relation_family),
ACQUAINTANCE(R.string.relation_acquaintance),
}
10 changes: 5 additions & 5 deletions Near/app/src/main/java/com/alarmy/near/model/ReminderInterval.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import com.alarmy.near.R
enum class ReminderInterval(
@param:StringRes val labelRes: Int,
) {
DAILY(R.string.reminder_interval_daily), // 매일
WEEKLY(R.string.reminder_interval_weekly), // 매주
BIWEEKLY(R.string.reminder_interval_biweekly), // 2주
MONTHLY(R.string.reminder_interval_monthly), // 매달
SEMIANNUAL(R.string.reminder_interval_semiannual), // 6개월
EVERY_DAY(R.string.reminder_interval_daily),
EVERY_WEEK(R.string.reminder_interval_weekly),
EVERY_TWO_WEEK(R.string.reminder_interval_biweekly),
EVERY_MONTH(R.string.reminder_interval_monthly),
EVERY_SIX_MONTH(R.string.reminder_interval_semiannual),
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.alarmy.near.model.friendsummary

enum class ContactFrequencyLevel {
LOW,
MIDDLE,
HIGH,
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.alarmy.near.model
package com.alarmy.near.model.friendsummary

import androidx.compose.runtime.Immutable

Expand All @@ -9,5 +9,5 @@ data class FriendSummary(
val profileImageUrl: String?,
val lastContactedAt: String?,
val isContacted: Boolean,
val contactFrequency: ContactFrequency,
val contactFrequencyLevel: ContactFrequencyLevel,
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.alarmy.near.model.monthly
import androidx.annotation.DrawableRes
import com.alarmy.near.R

// TODO Drawable Res UI-Layer 이동

Choose a reason for hiding this comment

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

medium

// TODO 주석으로 이미 인지하고 계신 점 좋습니다. Model 레이어에 @DrawableRes와 같은 안드로이드 종속성을 갖는 것은 아키텍처 원칙에 위배될 수 있습니다. 이 종속성을 UI 레이어로 옮기는 것을 고려해보세요. 예를 들어, UI 레이어에서 MonthlyFriendType에 따라 적절한 Drawable 리소스를 매핑하는 확장 함수나 헬퍼 클래스를 만들 수 있습니다.

enum class MonthlyFriendType(
@param:DrawableRes val imageSrc: Int,
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.alarmy.near.network.request

import kotlinx.serialization.Serializable

@Serializable
data class FriendRequest(
val name: String,
val relation: String,
val contactFrequency: ContactFrequencyRequest,
val birthday: String?,
val anniversaryList: List<AnniversaryRequest>,
val memo: String?,
val phone: String?,
)

@Serializable
data class ContactFrequencyRequest(
val contactWeek: String,
val dayOfWeek: String,
)

@Serializable
data class AnniversaryRequest(
val id: Int? = null,
val title: String,
val date: String? = null,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.alarmy.near.network.response

import kotlinx.serialization.Serializable

@Serializable
data class CommonMessageEntity(
val message: String,
)
Loading