Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

기타 접근성 정보 내려주기 #331

Merged
merged 13 commits into from
Aug 4, 2024
Merged

기타 접근성 정보 내려주기 #331

merged 13 commits into from
Aug 4, 2024

Conversation

sanggggg
Copy link
Contributor

@sanggggg sanggggg commented Jul 5, 2024

화장실과 같은 외부 소스에서 가져온 접근성 정보를 저장하고 조회할 수 있도록 한다.

external_accessibility 라는 도메인을 별도로 만들고 그곳 안에서 작업함.

Copy link

github-actions bot commented Jul 5, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

Copy link

github-actions bot commented Jul 5, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

Copy link

github-actions bot commented Jul 6, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

Copy link

github-actions bot commented Jul 6, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

Copy link

github-actions bot commented Jul 6, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

@sanggggg sanggggg changed the title [DRAFT] CI 확인 기타 접근성 정보 내려주기 Jul 6, 2024
@sanggggg sanggggg marked this pull request as ready for review July 6, 2024 07:33
@sanggggg sanggggg requested a review from a team as a code owner July 6, 2024 07:33
Copy link

github-actions bot commented Jul 6, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

created_at TIMESTAMP(6) WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP(6) WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP,
category VARCHAR(32) AS ExternalAccessibilityCategory NOT NULL,
details TEXT,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

JSON 필드로 하려고 했는데 sqldelight 버그가 있어서 해결된 버전으로 올려야 하는데 과정에서 change 들 때문에 깨지는게 있어서 그냥 TEXT 로 저장한다.
sqldelight/sqldelight#5030

@sanggggg sanggggg enabled auto-merge (squash) July 6, 2024 08:13
Copy link

github-actions bot commented Jul 6, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

Copy link
Contributor

@Zeniuus Zeniuus left a comment

Choose a reason for hiding this comment

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

현재 기능에는 전혀 문제 없어 보여서 lgtm


ExternalAccessibility:
type: object
properties:
Copy link
Contributor

Choose a reason for hiding this comment

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

required 필드 안 둬도 되나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -24,6 +29,25 @@ data class Location(
fun minusLat(length: Length) = copy(
lat = lat - length.toLatDiff()
)

fun distanceMeter(location: Location): Length {
Copy link
Contributor

Choose a reason for hiding this comment

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

LocationUtils.calculateDistance()가 있습니당

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}


private fun levenshtein(s1: String, s2: String, cost: Map<Pair<Char, Char>, Int> = emptyMap()): Int {
Copy link
Contributor

Choose a reason for hiding this comment

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

ㅋㅋ

Comment on lines +31 to +34
.filter {
searchText ?: return@filter true
searchText.isSimilarWith(it.name)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

별다른 정렬 로직은 없나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

일단은 UX 상에서 없어서 쉽게 가고, 나중에 필요할 시 추가하겠습니다

Comment on lines +7 to +16
data class ExternalAccessibility(
val id: String,
val name: String,
val location: Location,
val address: String,
val createdAt: Instant,
val updatedAt: Instant,
val category: ExternalAccessibilityCategory,
val toiletDetails: ToiletAccessibilityDetails?,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

외부 데이터를 연동해올 때 쓸 수 있는 멱등키 같은 게 column으로 들어가 있으면 나중에 여러 데이터 소스에서 여러 번 불러올 때 더 좋을 것 같군요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(소스별 prefix + 소스에서제공하는 id) 를 멱등키로 업데이트 하려고 합니다. 이걸 externalAccessibility.id 로 저장할 예정

Copy link
Contributor

Choose a reason for hiding this comment

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

그러면 id가 멱등키로 쓰인다는 주석이 있으면 좋겠습니닷

Copy link

github-actions bot commented Jul 6, 2024

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

Copy link

🔥🔥🔥 Backend CI Failed. github action link 🔥🔥🔥

@sanggggg sanggggg merged commit b805813 into main Aug 4, 2024
1 check passed
@sanggggg sanggggg deleted the sanggggg/toilet branch August 4, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants