-
Notifications
You must be signed in to change notification settings - Fork 0
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
강의동 Mock Data 추가 #212
강의동 Mock Data 추가 #212
Conversation
320c071
to
4ba2282
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LectureHall 데이터는 언제 어떻게 채워지나요
|
||
enum class Campus { | ||
GWANAK, | ||
YEONGUN, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeongeon 이 일관될 듯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔫
package com.wafflestudio.snu4t.lecturehalls.data | ||
|
||
class GeoCoordinate( | ||
val lat: Double, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
약어 딴곳에서도 잘 안 쓰니까 안 쓰는 게 좋지 않을까
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lat/lon 말한거지? 바꿨음
@@ -34,6 +38,7 @@ data class ClassPlaceAndTimeLegacyDto( | |||
val periodLength: Double, | |||
@JsonProperty("start") | |||
val startPeriod: Double, | |||
val lectureHall: LectureHall? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한 dto 안에 snake 랑 섞여있지만 새로 만드는 건 camel 로 하는 게 나으려나…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엉 섞여있는데 앞으로의 방향성은 camel이라고 해서 우선 일케해쓰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅇㅇ 이미 얘기 끝났던건데
|
||
@Document | ||
data class LectureHall( | ||
@Id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금도 lecture 에 강의실 정보 있긴 한데, 따로 document 파는 게 좋은 이유는 머 때문이야?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 우선 Lecture에 종속되는 정보가 아니기도 하고(한 강의동 - 여러 강의)
- 이 데이터들만 가지고 기능이 새로 나올 수 있다고 생각했기 때문! 건물간 시간 보여준다거나/걔를 이용해서 가까운 강의실 강의 검색하거나 등등 본격적인 지도 기능이 들어가려면 얘가 별도 document로 있는게 낫다고 생각했음
import org.springframework.data.mongodb.core.mapping.Document | ||
|
||
@Document | ||
data class LectureHall( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
원어민이 아니라 궁금한 건데 쥐콩만한 강의실도 hall?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요것은 강의실(X) 강의동(O) 입니다. 건물 전체를 말하는거라 Building을 할까 Hall을 할까 하다가 Hall로 했는데 더 나은 것 있으면 추천받아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빌딩이 더 낫지않나?
기존 lecture에 place 정보 싹 긁어서 모아다가 걍 배치 이용해서 한번에 populate 하려고 했음 데이터 출처는 여기 |
@@ -34,6 +38,7 @@ data class ClassPlaceAndTimeLegacyDto( | |||
val periodLength: Double, | |||
@JsonProperty("start") | |||
val startPeriod: Double, | |||
val lectureHall: LectureHall? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅇㅇ 이미 얘기 끝났던건데
) | ||
|
||
private fun MockLectureHall() = LectureHall( | ||
id = UUID.randomUUID().toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
왜 UUID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uuid 스펙이랑 다름 ObjectId.get().toHexString() ㄱㄱ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그냥 mock이라서? 아무 스트링이나 넣었음
ClassPlaceAndTimeDto는 쓰이고 있긴해 정확히는 이전에 쓰던 시간표응답에는 TimetableLegacyDto 이거 내려가고 있는데 약 1년반 뒤는 TimetableDto로 바꾸고 레거시 붙은거 다 삭제할듯 |
v1/search_query
API에서 강의동에 대한 더미 데이터를 받을 수 있도록합니다.ClassPlaceAndTimeLegacyDto
만 쓰이고ClassPlaceAndTimeDto
는 안쓰이는 것 같은데 이유를 아시는분?? @Hank-Choi @davin111